Open
Description
Given that #23 is closed, the API looks something like:
// OnOomError is a variable, `try_*` is always available
fn try_push(&mut self: Vec<T, A: AllocRef, OnOomError>, t: T) -> Result<(), (AllocError, T)> { .. }
// NoAbort is a data type, used as a sentinel indicating the consumer is prohibited from using the aborting methods.
struct NoAbort();
// Abort is a data type, used as a sentinel indicating the consumer is allowed to use the aborting methods.
struct Abort();
fn push(&mut self: Vec<T, A: AllocRef, Abort>, t: T) -> T {
match self.push(t) {
OK(v) => v,
Err(e) => handle_alloc_error(e),
}
}
Metadata
Metadata
Assignees
Labels
No labels