[][src]Struct pagecache::OneShot

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

A Future value which may or may not be filled

Methods

impl<T> OneShot<T>[src]

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

Create a new OneShotFiller and the OneShot that will be filled by its completion.

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

Block on the OneShot's completion or dropping of the OneShotFiller

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

Block on the OneShot's completion or dropping of the OneShotFiller.

Panics

panics if the OneShotFiller is dropped without completing the promise.

Trait Implementations

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

impl<T> Future for OneShot<Result<T>>[src]

type Output = Result<T>

The type of value produced on completion.

Auto Trait Implementations

impl<T> Unpin for OneShot<T>

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

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

impl<T> !UnwindSafe for OneShot<T>

impl<T> !RefUnwindSafe for OneShot<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> 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]