impl<St, F> Future for AnyFuture<'_, St, F> where
St: ?Sized + Stream + Unpin,
F: FnMut(St::Item) -> bool,
{ type Output = bool;
fn poll(self: Pin<&mutSelf>, cx: &mut Context<'_>) -> Poll<Self::Output> { let me = self.project(); letmut stream = Pin::new(me.stream);
// Take a maximum of 32 items from the stream before yielding. for _ in0..32 { match futures_core::ready!(stream.as_mut().poll_next(cx)) {
Some(v) => { if (me.f)(v) { return Poll::Ready(true);
}
}
None => return Poll::Ready(false),
}
}
cx.waker().wake_by_ref();
Poll::Pending
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-22)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.