pub struct RemainingBudget { /* private fields */ }Expand description
What is left of an operation’s absolute deadline — never a fresh timeout, so a slow earlier step shortens the next one rather than extending the total.
Implementations§
Source§impl RemainingBudget
impl RemainingBudget
Sourcepub fn starting_now(total: Duration) -> Self
pub fn starting_now(total: Duration) -> Self
Open a budget expiring total from now.
pub fn remaining(&self) -> Duration
pub fn is_exhausted(&self) -> bool
Trait Implementations§
Source§impl Clone for RemainingBudget
impl Clone for RemainingBudget
impl Copy for RemainingBudget
Auto Trait Implementations§
impl Freeze for RemainingBudget
impl RefUnwindSafe for RemainingBudget
impl Send for RemainingBudget
impl Sync for RemainingBudget
impl Unpin for RemainingBudget
impl UnsafeUnpin for RemainingBudget
impl UnwindSafe for RemainingBudget
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