[−][src]Struct sealrs::futures::async_promise::AsyncPromise
Fields
future: TSafe<Future<V, E>>
Methods
impl<V: Send + Clone, E: Send + Clone> AsyncPromise<V, E>
[src]
pub fn new(
f: Box<dyn FnMut() -> Result<V, E> + Send>,
executor: TSafe<dyn Executor>
) -> AsyncPromise<V, E>
[src]
f: Box<dyn FnMut() -> Result<V, E> + Send>,
executor: TSafe<dyn Executor>
) -> AsyncPromise<V, E>
Trait Implementations
impl<V: Send + Clone, E: Send + Clone> Promise<V, E> for AsyncPromise<V, E>
[src]
fn try_complete(&mut self, result: Result<V, E>) -> bool
[src]
fn future(&self) -> WrappedFuture<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 AsyncPromise<V, E>
impl<V, E> Send for AsyncPromise<V, E>
impl<V, E> Unpin for AsyncPromise<V, E>
impl<V, E> RefUnwindSafe for AsyncPromise<V, E>
impl<V, E> UnwindSafe for AsyncPromise<V, E>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,