Struct kaktus::Stack
[−]
[src]
pub struct Stack<T> { /* fields omitted */ }
Methods
impl<T> Stack<T>
[src]
fn empty() -> Option<Self>
Empty stacks are represented by Option<Stack<T>>::None
fn root(val: T) -> Self
impl<T> Stack<T> where
T: Default,
[src]
T: Default,
fn root_default() -> Self
fn push_default(&self) -> Self
Trait Implementations
impl<T> PushPop<T> for Stack<T>
[src]
type This = Stack<T>
fn push(&self, val: T) -> Self
fn pop(&self) -> Option<Self>
fn peek(&self) -> Option<&T>
fn walk(&self) -> StackIterator<T>
fn depth(&self) -> usize
impl<T> Clone for Stack<T>
[src]
fn clone(&self) -> Stack<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T> Deref for Stack<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T: Debug> Debug for Stack<T>
[src]
impl<'a, T> IntoIterator for &'a Stack<T>
[src]
type Item = Stack<T>
The type of the elements being iterated over.
type IntoIter = StackIterator<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> StackIterator<T>
Creates an iterator from a value. Read more