[][src]Trait mp4parse_fallible::FallibleVec

pub trait FallibleVec<T> {
    fn try_push(&mut self, value: T) -> Result<(), ()>;
fn try_reserve(&mut self, additional: usize) -> Result<(), ()>;
fn try_extend_from_slice(&mut self, other: &[T]) -> Result<(), ()>
    where
        T: Clone
; }

Required methods

fn try_push(&mut self, value: T) -> Result<(), ()>

Append |val| to the end of |vec|. Returns Ok(()) on success, Err(()) if it fails, which can only be due to lack of memory.

fn try_reserve(&mut self, additional: usize) -> Result<(), ()>

Reserves capacity for at least additional more elements to be inserted in the vector. Does nothing if capacity is already sufficient. Return Ok(()) on success, Err(()) if it fails either due to lack of memory, or overflowing the usize used to store the capacity.

fn try_extend_from_slice(&mut self, other: &[T]) -> Result<(), ()> where
    T: Clone

Clones and appends all elements in a slice to the Vec. Returns Ok(()) on success, Err(()) if it fails, which can only be due to lack of memory.

Loading content...

Implementations on Foreign Types

impl<T> FallibleVec<T> for Vec<T>[src]

Loading content...

Implementors

Loading content...