[][src]Struct global::Immutable

pub struct Immutable<T> { /* fields omitted */ }

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.

Methods

impl<T: Default> Immutable<T>[src]

pub fn force_init(&self)[src]

Force the inner value to be initialized.

This will only initialize the value if it has not already been initialized.

impl<T> Immutable<T>[src]

pub const fn new() -> Self[src]

The initial global value.

Trait Implementations

impl<T: Send> Send for Immutable<T>[src]

impl<T: Sync> Sync for Immutable<T>[src]

impl<T> Drop for Immutable<T>[src]

impl<T: Default> Deref for Immutable<T>[src]

type Target = T

The resulting type after dereferencing.

Auto Trait Implementations

impl<T> Unpin for Immutable<T> where
    T: Unpin

impl<T> UnwindSafe for Immutable<T> where
    T: UnwindSafe

impl<T> !RefUnwindSafe for Immutable<T>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]