[][src]Enum nstack::NStack

pub enum NStack<T, A, S> where
    A: Canon<S>,
    T: Canon<S>,
    S: Store
{ Leaf([Option<T>; 4]), Node([Option<Annotated<NStack<T, A, S>, S>>; 4]), }

Variants

Leaf([Option<T>; 4])
Node([Option<Annotated<NStack<T, A, S>, S>>; 4])

Implementations

impl<T, A, S> NStack<T, A, S> where
    T: Canon<S>,
    A: Canon<S> + Annotation<Self, S>,
    S: Store
[src]

pub fn new() -> Self[src]

Creates a new empty NStack

pub fn push(&mut self, t: T) -> Result<(), S::Error>[src]

Pushes a new element onto the stack

pub fn pop(&mut self) -> Result<Option<T>, S::Error>[src]

Pop an element off the stack.

Returns the popped element, if any.

Trait Implementations

impl<T: Canon<S>, A: Canon<S>, S: Canon<S>> Canon<S> for NStack<T, A, S> where
    A: Canon<S>,
    T: Canon<S>,
    S: Store
[src]

impl<T: Clone, A: Clone, S: Clone> Clone for NStack<T, A, S> where
    A: Canon<S>,
    T: Canon<S>,
    S: Store
[src]

impl<T, A, S> Compound<S> for NStack<T, A, S> where
    T: Canon<S>,
    A: Canon<S>,
    S: Store
[src]

type Leaf = T

The leaf type of the collection

type Annotation = A

The annotation type of the connection

impl<T: Debug, A: Debug, S: Debug> Debug for NStack<T, A, S> where
    A: Canon<S>,
    T: Canon<S>,
    S: Store
[src]

impl<T, A, S> Default for NStack<T, A, S> where
    T: Canon<S>,
    A: Canon<S> + Annotation<Self, S>,
    S: Store
[src]

Auto Trait Implementations

impl<T, A, S> !RefUnwindSafe for NStack<T, A, S>[src]

impl<T, A, S> !Send for NStack<T, A, S>[src]

impl<T, A, S> !Sync for NStack<T, A, S>[src]

impl<T, A, S> Unpin for NStack<T, A, S> where
    A: Unpin,
    S: Unpin,
    T: Unpin,
    <S as Store>::Ident: Unpin
[src]

impl<T, A, S> !UnwindSafe for NStack<T, A, S>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.