Skip to main content

OperationDeadline

Struct OperationDeadline 

Source
pub struct OperationDeadline<'timer> { /* private fields */ }
Expand description

Elapsed-time state for one logical operation’s retry loop.

Implementations§

Source§

impl<'timer> OperationDeadline<'timer>

Source

pub fn start(timer: &'timer dyn MonotonicTimer, deadline: Duration) -> Self

Starts a deadline at the timer’s current monotonic reading.

Source

pub fn remaining(&self) -> Option<Duration>

Returns the remaining duration, or None once the deadline expires.

Source

pub fn deadline(&self) -> Duration

Returns the total duration assigned to the operation.

Auto Trait Implementations§

§

impl<'timer> !RefUnwindSafe for OperationDeadline<'timer>

§

impl<'timer> !UnwindSafe for OperationDeadline<'timer>

§

impl<'timer> Freeze for OperationDeadline<'timer>

§

impl<'timer> Send for OperationDeadline<'timer>

§

impl<'timer> Sync for OperationDeadline<'timer>

§

impl<'timer> Unpin for OperationDeadline<'timer>

§

impl<'timer> UnsafeUnpin for OperationDeadline<'timer>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.