Struct coco::stack::Stack
[−]
[src]
pub struct Stack<T> { /* fields omitted */ }
A lock-free stack.
It can be used with multiple producers and multiple consumers at the same time.
Methods
impl<T> Stack<T>
[src]
fn new() -> Self
Returns a new, empty stack.
fn is_empty(&self) -> bool
Returns true
if the stack is empty.
fn push(&self, value: T)
Pushes a new value onto the stack.
fn pop(&self) -> Option<T>
Attemps to pop an value from the stack.
Returns None
if the stack is empty.