Struct Sleeper
pub struct Sleeper { /* private fields */ }Expand description
A struct which can be used to select across many Futures at once without relying on a full
async context.
Implementations§
§impl Sleeper
impl Sleeper
pub fn from_single_future(future: &Future) -> Sleeper
pub fn from_single_future(future: &Future) -> Sleeper
Constructs a new sleeper from one future, allowing blocking on it.
pub fn from_two_futures(fut_a: &Future, fut_b: &Future) -> Sleeper
pub fn from_two_futures(fut_a: &Future, fut_b: &Future) -> Sleeper
Constructs a new sleeper from two futures, allowing blocking on both at once.
pub fn from_three_futures(
fut_a: &Future,
fut_b: &Future,
fut_c: &Future,
) -> Sleeper
pub fn from_three_futures( fut_a: &Future, fut_b: &Future, fut_c: &Future, ) -> Sleeper
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§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request