pub struct Immutable<T> { /* private fields */ }
Expand description
An immutable global value.
All types wrapped in Immutable
must implement Default
. This gives the
initial value of the global variable.
This type can be directly dereferenced. Initialization occurs upon the first dereference.
Implementations§
Trait Implementations§
impl<T: Send> Send for Immutable<T>
impl<T: Sync> Sync for Immutable<T>
Auto Trait Implementations§
impl<T> !Freeze for Immutable<T>
impl<T> !RefUnwindSafe for Immutable<T>
impl<T> Unpin for Immutable<T>where
T: Unpin,
impl<T> UnwindSafe for Immutable<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