[][src]Struct sealrs::futures::completable_promise::CompletablePromise

pub struct CompletablePromise<V: Send + Clone + 'static, E: Send + Clone + 'static> {
    pub future: TSafe<Future<V, E>>,
}

Fields

future: TSafe<Future<V, E>>

Methods

impl<V: Send + Clone, E: Send + Clone> CompletablePromise<V, E>[src]

pub fn new() -> CompletablePromise<V, E>[src]

Trait Implementations

impl<V: Send + Clone, E: Send + Clone> Promise<V, E> for CompletablePromise<V, E>[src]

fn complete(&mut self, result: Result<V, E>) -> bool[src]

Completes promise with some result. Attention, promise may be completed only once and repeat attempt to do this will cause to panic! Read more

fn success(&mut self, value: V) -> bool[src]

Completes promise with success result

fn failure(&mut self, cause: E) -> bool[src]

Completes promise with failed result

Auto Trait Implementations

impl<V, E> Sync for CompletablePromise<V, E>

impl<V, E> Send for CompletablePromise<V, E>

impl<V, E> Unpin for CompletablePromise<V, E>

impl<V, E> RefUnwindSafe for CompletablePromise<V, E>

impl<V, E> UnwindSafe for CompletablePromise<V, E>

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]