pub struct Stack<T> { /* private fields */ }
Expand description
A stack-like data structure implemented through a Vec
.
The name “stack” for this type of structure comes from the analogy to a set of physical items stacked on top of each other, which makes it easy to take an item off the top of the stack, while getting to an item deeper in the stack may require taking off multiple other items first.
Considered as a linear data structure, or more abstractly a sequential collection, the push and pop operations occur only at one end of the structure, referred to as the top of the stack.
References:
Implementations§
Source§impl<T> Stack<T>
impl<T> Stack<T>
Auto Trait Implementations§
impl<T> Freeze for Stack<T>
impl<T> RefUnwindSafe for Stack<T>where
T: RefUnwindSafe,
impl<T> Send for Stack<T>where
T: Send,
impl<T> Sync for Stack<T>where
T: Sync,
impl<T> Unpin for Stack<T>where
T: Unpin,
impl<T> UnwindSafe for Stack<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more