pub struct Timeout<F> { /* private fields */ }Expand description
Future that completes with Ok(T) if the inner future finishes
before the deadline, or Err(Elapsed) if the deadline fires first.
Implementations§
Source§impl<F> Timeout<F>
impl<F> Timeout<F>
Sourcepub fn into_inner(self) -> F
pub fn into_inner(self) -> F
Recover the wrapped future, discarding the timeout.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Timeout<F>where
F: Freeze,
impl<F> !RefUnwindSafe for Timeout<F>
impl<F> !Send for Timeout<F>
impl<F> !Sync for Timeout<F>
impl<F> Unpin for Timeout<F>where
F: Unpin,
impl<F> UnsafeUnpin for Timeout<F>where
F: UnsafeUnpin,
impl<F> !UnwindSafe for Timeout<F>
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more