pub struct Singleton { /* private fields */ }
Expand description
Caches an instance upon first creation for the entire duration of the program.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Singleton
impl Send for Singleton
impl Sync for Singleton
impl Unpin for Singleton
impl UnwindSafe for Singleton
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