MCPcopy Create free account
hub / github.com/bytecodealliance/wstd / delay

Method delay

src/future/future_ext.rs:67–73  ·  view source on GitHub ↗

Delay resolving the future until the given deadline. The underlying future will not be polled until the deadline has expired. In addition to using a time source as a deadline, any future can be used as a deadline too. When used in combination with a multi-consumer channel, this method can be used to synchronize the start of multiple futures and streams. # Example ```no_run use wstd::prelude::*;

(self, deadline: D)

Source from the content-addressed store, hash-verified

65 /// }
66 /// ```
67 fn delay<D>(self, deadline: D) -> Delay<Self, D::IntoFuture>
68 where
69 Self: Sized,
70 D: IntoFuture,
71 {
72 Delay::new(self, deadline.into_future())
73 }
74}
75
76impl<T> FutureExt for T where T: Future {}

Callers

nothing calls this directly

Implementers 1

future_ext.rssrc/future/future_ext.rs

Calls 1

into_futureMethod · 0.45

Tested by

no test coverage detected