[−][src]Enum nstack::NStack
Variants
Implementations
impl<T, A, S> NStack<T, A, S> where
T: Canon<S>,
A: Canon<S> + Annotation<Self, S>,
S: Store, [src]
T: Canon<S>,
A: Canon<S> + Annotation<Self, S>,
S: Store,
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]
A: Canon<S>,
T: Canon<S>,
S: Store,
fn write(&self, sink: &mut impl Sink<S>) -> Result<(), S::Error>[src]
fn read(source: &mut impl Source<S>) -> Result<Self, S::Error>[src]
fn encoded_len(&self) -> usize[src]
impl<T: Clone, A: Clone, S: Clone> Clone for NStack<T, A, S> where
A: Canon<S>,
T: Canon<S>,
S: Store, [src]
A: Canon<S>,
T: Canon<S>,
S: Store,
impl<T, A, S> Compound<S> for NStack<T, A, S> where
T: Canon<S>,
A: Canon<S>,
S: Store, [src]
T: Canon<S>,
A: Canon<S>,
S: Store,
type Leaf = T
The leaf type of the collection
type Annotation = A
The annotation type of the connection
fn child(&self, ofs: usize) -> Child<'_, Self, S>[src]
fn child_mut(&mut self, ofs: usize) -> ChildMut<'_, Self, S>[src]
pub fn child_iter(&self) -> ChildIterator<'_, Self, S>[src]
impl<T: Debug, A: Debug, S: Debug> Debug for NStack<T, A, S> where
A: Canon<S>,
T: Canon<S>,
S: Store, [src]
A: Canon<S>,
T: Canon<S>,
S: Store,
impl<T, A, S> Default for NStack<T, A, S> where
T: Canon<S>,
A: Canon<S> + Annotation<Self, S>,
S: Store, [src]
T: Canon<S>,
A: Canon<S> + Annotation<Self, S>,
S: Store,
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]
A: Unpin,
S: Unpin,
T: Unpin,
<S as Store>::Ident: Unpin,
impl<T, A, S> !UnwindSafe for NStack<T, A, S>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,