pub enum StorageDuration {
Static,
Thread,
Automatic,
}Expand description
How long an object lives.
Variants§
Static
From the start of the program to the end of it.
Thread
From the start of the thread to the end of it, which is _Thread_local.
Automatic
From the point the declaration is reached to the end of the block, which is where a variable length array’s deallocation and a compound literal’s lifetime both come from.
Trait Implementations§
Source§impl Clone for StorageDuration
impl Clone for StorageDuration
Source§fn clone(&self) -> StorageDuration
fn clone(&self) -> StorageDuration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StorageDuration
Source§impl Debug for StorageDuration
impl Debug for StorageDuration
impl Eq for StorageDuration
Source§impl PartialEq for StorageDuration
impl PartialEq for StorageDuration
impl StructuralPartialEq for StorageDuration
Auto Trait Implementations§
impl Freeze for StorageDuration
impl RefUnwindSafe for StorageDuration
impl Send for StorageDuration
impl Sync for StorageDuration
impl Unpin for StorageDuration
impl UnsafeUnpin for StorageDuration
impl UnwindSafe for StorageDuration
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