Struct eager_futures::Eager [−][src]
An eager future representing an asynchronous value.
Implementations
impl<'a, T> Eager<'a, T>
[src]
pub fn new() -> Self
[src]
Create a new eager future. Intended to be used by I/O operation implementers.
pub fn set_no_handler(&self)
[src]
Setup the eager future so that when it completes, discard the result and do nothing.
pub fn set_handler(&self, handler: impl FnOnce(T) + 'a)
[src]
Setup the eager future so that when it completes, call the supplied handler.
pub fn on_complete(&self, result: T)
[src]
Complete the eager future. Intended to be used by I/O operation implementers.
pub fn map<To, F>(&self, func: F) -> Eager<'a, To> where
To: 'a,
F: FnOnce(T) -> To + 'a,
[src]
To: 'a,
F: FnOnce(T) -> To + 'a,
Transform the result of this eager future by the computation defined by func
.
pub fn then<To, F>(&self, func: F) -> Eager<'a, To> where
To: 'a,
F: FnOnce(T) -> Eager<'a, To> + 'a,
[src]
To: 'a,
F: FnOnce(T) -> Eager<'a, To> + 'a,
Chain another operation defined by func
after this eager future completes.
Trait Implementations
impl<'a, T> Clone for Eager<'a, T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Eager<'a, T>
impl<'a, T> !Send for Eager<'a, T>
impl<'a, T> !Sync for Eager<'a, T>
impl<'a, T> Unpin for Eager<'a, T>
impl<'a, T> !UnwindSafe for Eager<'a, T>
Blanket Implementations
impl<T> Any for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,