Struct swiss_army_knife::StaticInitializedOnce [−][src]
pub struct StaticInitializedOnce<Value: Sized> { /* fields omitted */ }
Expand description
A wrapper type to use with mutable static fields where one does not want the overhead and inflexibility of lazy_static!
.
Implementations
impl<Value: Sized> StaticInitializedOnce<Value>
[src]
impl<Value: Sized> StaticInitializedOnce<Value>
[src]pub const fn uninitialized() -> Self
[src]
pub const fn uninitialized() -> Self
[src]Uninitialized value suitable for use in a static.
pub fn initialize_once(&mut self, value: Value) -> &mut Value
[src]
pub fn initialize_once(&mut self, value: Value) -> &mut Value
[src]Initialize once.
Not thread safe; indeed, may panic in debug mode.
pub fn value_mut(&mut self) -> &'static mut Value
[src]
pub fn value_mut(&mut self) -> &'static mut Value
[src]Value.
Auto Trait Implementations
impl<Value> RefUnwindSafe for StaticInitializedOnce<Value> where
Value: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Value> Send for StaticInitializedOnce<Value> where
Value: Send,
Value: Send,
impl<Value> Sync for StaticInitializedOnce<Value> where
Value: Sync,
Value: Sync,
impl<Value> Unpin for StaticInitializedOnce<Value> where
Value: Unpin,
Value: Unpin,
impl<Value> UnwindSafe for StaticInitializedOnce<Value> where
Value: UnwindSafe,
Value: UnwindSafe,