Struct pile::Pile [−][src]
pub struct Pile<T> { /* fields omitted */ }
A pile of T
.
You can throw more T
on the pile, but never remove them: The pile will
only grow bigger. This means references to existing things on the pile will
stay valid. Therefore, you can add elements through a non-mutable reference
to a Pile
.
(You can, of course, destroy the entire pile. But, like any other Rust data structure, only when there are no references to any elements left.)
Methods
impl<T> Pile<T>
[src]
impl<T> Pile<T>
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn from_elements(elements: Vec<T>) -> Self
[src]
pub fn from_elements(elements: Vec<T>) -> Self
pub fn into_elements(self) -> Vec<T>
[src]
pub fn into_elements(self) -> Vec<T>
pub fn mut_elements(&mut self) -> &mut Vec<T>
[src]
pub fn mut_elements(&mut self) -> &mut Vec<T>
impl<T: StableDeref> Pile<T>
[src]
impl<T: StableDeref> Pile<T>