[][src]Trait collectable::TryPush

pub trait TryPush<T> {
    fn try_push(&mut self, item: T) -> Result<(), T>;
}

Try to push an element onto a collection

Required methods

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

Try to push an element onto a collection.

Returns the original element if it's full.

Loading content...

Implementors

Loading content...