Struct nncombinator::Nil
source · [−]pub struct Nil;
Expand description
Empty stack, containing no elements
Trait Implementations
sourceimpl Stack for Nil
impl Stack for Nil
sourcefn pop(self) -> (Self::Remaining, Self::Head)
fn pop(self) -> (Self::Remaining, Self::Head)
Returns a tuple of the top item in the stack and the rest of the stack
sourcefn map<F: FnOnce(&Self::Head) -> O, O>(&self, f: F) -> O
fn map<F: FnOnce(&Self::Head) -> O, O>(&self, f: F) -> O
Returns the result of applying the callback function to the top element of the stack Read more
sourcefn map_remaining<F: FnOnce(&Self::Remaining) -> O, O>(&self, f: F) -> O
fn map_remaining<F: FnOnce(&Self::Remaining) -> O, O>(&self, f: F) -> O
Returns the result of applying the callback to a stack that does not contain the top element of the stack Read more
Auto Trait Implementations
impl RefUnwindSafe for Nil
impl Send for Nil
impl Sync for Nil
impl Unpin for Nil
impl UnwindSafe for Nil
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more