pub struct PersistentStack<T> { /* private fields */ }
Expand description
永続スタック
Implementations§
Source§impl<T> PersistentStack<T>
impl<T> PersistentStack<T>
Sourcepub fn new() -> Self
pub fn new() -> Self
空のPersistentStack
を生成する。
Sourcepub fn push(&self, value: T) -> Self
pub fn push(&self, value: T) -> Self
値value
を末尾に追加したPersistentStack
を返す。
Sourcepub fn pop(&self) -> Option<Self>
pub fn pop(&self) -> Option<Self>
末尾の要素を削除したPersistentStack
を返す。
Trait Implementations§
Source§impl<T: Clone> Clone for PersistentStack<T>
impl<T: Clone> Clone for PersistentStack<T>
Source§fn clone(&self) -> PersistentStack<T>
fn clone(&self) -> PersistentStack<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for PersistentStack<T>
impl<T: Debug> Debug for PersistentStack<T>
Source§impl<T: Default> Default for PersistentStack<T>
impl<T: Default> Default for PersistentStack<T>
Source§fn default() -> PersistentStack<T>
fn default() -> PersistentStack<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for PersistentStack<T>
impl<T> RefUnwindSafe for PersistentStack<T>where
T: RefUnwindSafe,
impl<T> !Send for PersistentStack<T>
impl<T> !Sync for PersistentStack<T>
impl<T> Unpin for PersistentStack<T>
impl<T> UnwindSafe for PersistentStack<T>where
T: RefUnwindSafe,
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