[][src]Struct pagecache::Promise

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

A Future value which may or may not be filled

Methods

impl<T> Promise<T>[src]

pub fn pair() -> (PromiseFiller<T>, Self)[src]

Create a new PromiseFiller and the Promise that will be filled by its completion.

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

Block on the Promise's completion or dropping of the PromiseFiller

pub fn unwrap(self) -> T[src]

Block on the Promise's completion or dropping of the PromiseFiller.

Panics

panics if the PromiseFiller is dropped without completing the promise.

Trait Implementations

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

Auto Trait Implementations

impl<T> Sync for Promise<T> where
    T: Send

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

impl<T> Unpin for Promise<T>

impl<T> !UnwindSafe for Promise<T>

impl<T> !RefUnwindSafe for Promise<T>

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