Struct tokio::timer::Deadline [−][src]
Allows a given Future
to execute until the specified deadline.
If the inner future completes before the deadline is reached, then
Deadline
completes with that value. Otherwise, Deadline
completes with a
DeadlineError
.
Methods
impl<T> Deadline<T>
[src]
[−]
impl<T> Deadline<T>
pub fn new(future: T, deadline: Instant) -> Deadline<T>
[src]
[−]
pub fn new(future: T, deadline: Instant) -> Deadline<T>
Create a new Deadline
that completes when future
completes or when
deadline
is reached.
ⓘImportant traits for &'a mut Rpub fn get_ref(&self) -> &T
[src]
[−]
ⓘImportant traits for &'a mut R
pub fn get_ref(&self) -> &T
Gets a reference to the underlying future in this deadline.
ⓘImportant traits for &'a mut Rpub fn get_mut(&mut self) -> &mut T
[src]
[−]
ⓘImportant traits for &'a mut R
pub fn get_mut(&mut self) -> &mut T
Gets a mutable reference to the underlying future in this deadline.
pub fn into_inner(self) -> T
[src]
[−]
pub fn into_inner(self) -> T
Consumes this deadline, returning the underlying future.
Trait Implementations
impl<T> Debug for Deadline<T> where
T: Debug,
[src]
[+]
impl<T> Debug for Deadline<T> where
T: Debug,
impl<T> Future for Deadline<T> where
T: Future,
[src]
[+]
impl<T> Future for Deadline<T> where
T: Future,