[][src]Struct lazy_futuristic::Lazy

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

Lazy variable.

Implementations

impl<T> Lazy<T>[src]

pub fn new() -> Self[src]

Create a new lazy variable.

pub async fn get_or_set<'l>(&'l self) -> ValueOrSetter<'l, T>[src]

Get the value or setter will be returned if value is not available.

pub fn get(&self) -> Option<&T>[src]

Get the value if available.

Trait Implementations

impl<T: Debug> Debug for Lazy<T>[src]

impl<T> Default for Lazy<T>[src]

impl<T> Sync for Lazy<T> where
    T: Sync
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Lazy<T>

impl<T> Send for Lazy<T> where
    T: Send

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

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

Blanket Implementations

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

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

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

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.