pub trait PushPop<T>where
Self: Sized,{
type This;
// Required methods
fn push(&self, val: T) -> Self::This;
fn pop(&self) -> Option<Self::This>;
fn peek(&self) -> Option<&T>;
fn walk(&self) -> StackIterator<T> ⓘ;
// Provided method
fn depth(&self) -> usize { ... }
}
Required Associated Types§
Required Methods§
fn push(&self, val: T) -> Self::This
fn pop(&self) -> Option<Self::This>
fn peek(&self) -> Option<&T>
fn walk(&self) -> StackIterator<T> ⓘ
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.