[][src]Enum futures_cache::State

pub enum State<T> {
    Fresh(StoredEntry<T>),
    Expired(StoredEntry<T>),
    Missing,
}

Represents the state of an entry.

Variants

Fresh(StoredEntry<T>)

Entry is fresh and can be used.

Expired(StoredEntry<T>)

Entry exists, but is expired. Cache is referenced so that the value can be removed if needed.

Missing

No entry.

Methods

impl<T> State<T>[src]

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

Get as an option, regardless if it's expired or not.

Auto Trait Implementations

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

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

impl<T> Sync for State<T> where
    T: Sync

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

impl<T> RefUnwindSafe for State<T> where
    T: RefUnwindSafe

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> 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]