pub enum MapOk<Fut, F> {
Incomplete {
future: Fut,
f: F,
},
Complete,
}
Expand description
Future for the map
method.
Variants
Incomplete
Complete
Trait Implementations
sourceimpl<U, Fut, A, F> ActorFuture<A> for MapOk<Fut, F> where
Fut: ActorTryFuture<A>,
A: Actor,
F: FnOnce(Fut::Ok, &mut A, &mut A::Context) -> U,
impl<U, Fut, A, F> ActorFuture<A> for MapOk<Fut, F> where
Fut: ActorTryFuture<A>,
A: Actor,
F: FnOnce(Fut::Ok, &mut A, &mut A::Context) -> U,
impl<'__pin, Fut, F> Unpin for MapOk<Fut, F> where
__Origin<'__pin, Fut, F>: Unpin,
Auto Trait Implementations
impl<Fut, F> RefUnwindSafe for MapOk<Fut, F> where
F: RefUnwindSafe,
Fut: RefUnwindSafe,
impl<Fut, F> Send for MapOk<Fut, F> where
F: Send,
Fut: Send,
impl<Fut, F> Sync for MapOk<Fut, F> where
F: Sync,
Fut: Sync,
impl<Fut, F> UnwindSafe for MapOk<Fut, F> where
F: UnwindSafe,
Fut: UnwindSafe,
Blanket Implementations
sourceimpl<F, A> ActorFutureExt<A> for F where
F: ActorFuture<A>,
A: Actor,
impl<F, A> ActorFutureExt<A> for F where
F: ActorFuture<A>,
A: Actor,
sourcefn map<F, U>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output, &mut A, &mut A::Context) -> U,
Self: Sized,
fn map<F, U>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output, &mut A, &mut A::Context) -> U,
Self: Sized,
Map this future’s result to a different type, returning a new future of the resulting type. Read more
sourcefn then<F, Fut>(self, f: F) -> Then<Self, Fut, F> where
F: FnOnce(Self::Output, &mut A, &mut A::Context) -> Fut,
Fut: ActorFuture<A>,
Self: Sized,
fn then<F, Fut>(self, f: F) -> Then<Self, Fut, F> where
F: FnOnce(Self::Output, &mut A, &mut A::Context) -> Fut,
Fut: ActorFuture<A>,
Self: Sized,
Chain on a computation for when a future finished, passing the result of
the future to the provided closure f
. Read more
sourcefn timeout(self, timeout: Duration) -> Timeout<Self> where
Self: Sized,
fn timeout(self, timeout: Duration) -> Timeout<Self> where
Self: Sized,
Add timeout to futures chain. Read more
sourcefn boxed_local(self) -> LocalBoxActorFuture<A, Self::Output> where
Self: Sized + 'static,
fn boxed_local(self) -> LocalBoxActorFuture<A, Self::Output> where
Self: Sized + 'static,
Wrap the future in a Box, pinning it. Read more
sourceimpl<A, F, T, E> ActorTryFuture<A> for F where
A: Actor,
F: ActorFuture<A, Output = Result<T, E>> + ?Sized,
impl<A, F, T, E> ActorTryFuture<A> for F where
A: Actor,
F: ActorFuture<A, Output = Result<T, E>> + ?Sized,
sourceimpl<A, F> ActorTryFutureExt<A> for F where
A: Actor,
F: ActorTryFuture<A> + ?Sized,
impl<A, F> ActorTryFutureExt<A> for F where
A: Actor,
F: ActorTryFuture<A> + ?Sized,
sourcefn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F> where
F: FnOnce(Self::Ok, &mut A, &mut A::Context) -> Fut,
Fut: ActorTryFuture<A, Error = Self::Error>,
Self: Sized,
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F> where
F: FnOnce(Self::Ok, &mut A, &mut A::Context) -> Fut,
Fut: ActorTryFuture<A, Error = Self::Error>,
Self: Sized,
Executes another actor future after this one resolves successfully. The success value is passed to a closure to create this subsequent actor future. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more