pub struct Sleeper { /* private fields */ }
Available on crate feature
std
only.Expand description
A struct which can be used to select across many Future
s at once without relying on a full
async context.
Implementations§
Source§impl Sleeper
impl Sleeper
Sourcepub fn from_single_future(future: &Future) -> Self
pub fn from_single_future(future: &Future) -> Self
Constructs a new sleeper from one future, allowing blocking on it.
Sourcepub fn from_two_futures(fut_a: &Future, fut_b: &Future) -> Self
pub fn from_two_futures(fut_a: &Future, fut_b: &Future) -> Self
Constructs a new sleeper from two futures, allowing blocking on both at once.
Sourcepub fn from_three_futures(
fut_a: &Future,
fut_b: &Future,
fut_c: &Future,
) -> Self
pub fn from_three_futures( fut_a: &Future, fut_b: &Future, fut_c: &Future, ) -> Self
Constructs a new sleeper from three futures, allowing blocking on all three at once.
Auto Trait Implementations§
impl Freeze for Sleeper
impl RefUnwindSafe for Sleeper
impl Send for Sleeper
impl Sync for Sleeper
impl Unpin for Sleeper
impl UnwindSafe for Sleeper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more