pub struct Singleton<T> {
pub value: T,
}Expand description
A singleton: a value that is uniquely determined by its type.
Fields§
§value: TThe unique value
Implementations§
Auto Trait Implementations§
impl<T> Freeze for Singleton<T>where
T: Freeze,
impl<T> RefUnwindSafe for Singleton<T>where
T: RefUnwindSafe,
impl<T> Send for Singleton<T>where
T: Send,
impl<T> Sync for Singleton<T>where
T: Sync,
impl<T> Unpin for Singleton<T>where
T: Unpin,
impl<T> UnsafeUnpin for Singleton<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Singleton<T>where
T: UnwindSafe,
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