[][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> Immutable<T>[src]

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

The initial global value.

Trait Implementations

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

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

impl<T: Send + Sync + Default + 'static> Deref for Immutable<T>[src]

type Target = T

The resulting type after dereferencing.

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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