Struct smol::stream::ForEachFuture
source · [−]pub struct ForEachFuture<S, F> { /* private fields */ }
Expand description
Future for the StreamExt::for_each()
method.
Trait Implementations
sourceimpl<S, F> Debug for ForEachFuture<S, F> where
S: Debug,
F: Debug,
impl<S, F> Debug for ForEachFuture<S, F> where
S: Debug,
F: Debug,
sourceimpl<S, F> Future for ForEachFuture<S, F> where
S: Stream,
F: FnMut(<S as Stream>::Item),
impl<S, F> Future for ForEachFuture<S, F> where
S: Stream,
F: FnMut(<S as Stream>::Item),
sourcefn poll(
self: Pin<&mut ForEachFuture<S, F>>,
cx: &mut Context<'_>
) -> Poll<<ForEachFuture<S, F> as Future>::Output>
fn poll(
self: Pin<&mut ForEachFuture<S, F>>,
cx: &mut Context<'_>
) -> Poll<<ForEachFuture<S, F> as Future>::Output>
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
impl<'__pin, S, F> Unpin for ForEachFuture<S, F> where
__Origin<'__pin, S, F>: Unpin,
Auto Trait Implementations
impl<S, F> RefUnwindSafe for ForEachFuture<S, F> where
F: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, F> Send for ForEachFuture<S, F> where
F: Send,
S: Send,
impl<S, F> Sync for ForEachFuture<S, F> where
F: Sync,
S: Sync,
impl<S, F> UnwindSafe for ForEachFuture<S, F> where
F: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> FutureExt for F where
F: Future + ?Sized,
impl<F> FutureExt for F where
F: Future + ?Sized,
sourcefn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output> where
Self: Unpin,
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output> where
Self: Unpin,
A convenience for calling Future::poll()
on !
Unpin
types.
sourcefn or<F>(self, other: F) -> Or<Self, F>ⓘNotable traits for Or<F1, F2>impl<T, F1, F2> Future for Or<F1, F2> where
F1: Future<Output = T>,
F2: Future<Output = T>, type Output = T;
where
F: Future<Output = Self::Output>,
fn or<F>(self, other: F) -> Or<Self, F>ⓘNotable traits for Or<F1, F2>impl<T, F1, F2> Future for Or<F1, F2> where
F1: Future<Output = T>,
F2: Future<Output = T>, type Output = T;
where
F: Future<Output = Self::Output>,
F1: Future<Output = T>,
F2: Future<Output = T>, type Output = T;
Returns the result of self
or other
future, preferring self
if both are ready. Read more
sourcefn race<F>(self, other: F) -> Race<Self, F>ⓘNotable traits for Race<F1, F2>impl<T, F1, F2> Future for Race<F1, F2> where
F1: Future<Output = T>,
F2: Future<Output = T>, type Output = T;
where
F: Future<Output = Self::Output>,
fn race<F>(self, other: F) -> Race<Self, F>ⓘNotable traits for Race<F1, F2>impl<T, F1, F2> Future for Race<F1, F2> where
F1: Future<Output = T>,
F2: Future<Output = T>, type Output = T;
where
F: Future<Output = Self::Output>,
F1: Future<Output = T>,
F2: Future<Output = T>, type Output = T;
Returns the result of self
or other
future, with no preference if both are ready. Read more
sourcefn catch_unwind(self) -> CatchUnwind<Self>ⓘNotable traits for CatchUnwind<F>impl<F> Future for CatchUnwind<F> where
F: Future + UnwindSafe, type Output = Result<<F as Future>::Output, Box<dyn Any + Send + 'static, Global>>;
where
Self: UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self>ⓘNotable traits for CatchUnwind<F>impl<F> Future for CatchUnwind<F> where
F: Future + UnwindSafe, type Output = Result<<F as Future>::Output, Box<dyn Any + Send + 'static, Global>>;
where
Self: UnwindSafe,
F: Future + UnwindSafe, type Output = Result<<F as Future>::Output, Box<dyn Any + Send + 'static, Global>>;
Catches panics while polling the future. Read more
sourcefn boxed<'a>(
self
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
Self: 'a + Send,
fn boxed<'a>(
self
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
Self: 'a + Send,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Boxes the future and changes its type to dyn Future + Send + 'a
. Read more
sourcefn boxed_local<'a>(
self
) -> Pin<Box<dyn Future<Output = Self::Output> + 'a, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
Self: 'a,
fn boxed_local<'a>(
self
) -> Pin<Box<dyn Future<Output = Self::Output> + 'a, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
Self: 'a,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Boxes the future and changes its type to dyn Future + 'a
. Read more
sourceimpl<F> IntoFuture for F where
F: Future,
impl<F> IntoFuture for F where
F: Future,
type Output = <F as Future>::Output
type Output = <F as Future>::Output
into_future
)The output that the future will produce on completion.
type IntoFuture = F
type IntoFuture = F
into_future
)Which kind of future are we turning this into?
sourcefn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
into_future
)Creates a future from a value.