Trait try_push::TryPush [−][src]
Required methods
fn try_push(&mut self, elem: T) -> Element<T>
[src]
Attempts to push an element to the collection. If that action would
re-allocate or require shifting elements then the elem
is returned
in Element::NotAdded()
. Otherwise, the return value is Element::Added
.
fn try_push_front(&mut self, elem: T) -> Element<T>
[src]
Attempts to push an element front to the collection. If that action would
re-allocate or require shifting elements then the elem
is returned
in Element::NotAdded()
. Otherwise, the return value is Element::Added
.