1 2 3 4 5 6 7
pub trait Stack<T> { fn push(&mut self, T); fn pop(&mut self) -> Option<T>; fn top(&self) -> Option<&T>; fn top_mut(&mut self) -> Option<&mut T>; }