Struct sozu_lib::timer::TimeoutContainer
source · pub struct TimeoutContainer { /* private fields */ }
Implementations§
source§impl TimeoutContainer
impl TimeoutContainer
pub fn new(duration: Duration, token: Token) -> TimeoutContainer
pub fn new_empty(duration: Duration) -> TimeoutContainer
pub fn take(&mut self) -> TimeoutContainer
sourcepub fn triggered(&mut self)
pub fn triggered(&mut self)
must be called when a timeout was triggered, to prevent errors when canceling
pub fn set(&mut self, token: Token)
sourcepub fn set_duration(&mut self, duration: Duration)
pub fn set_duration(&mut self, duration: Duration)
warning: this does not reset the timer
pub fn duration(&self) -> Duration
pub fn cancel(&mut self) -> bool
pub fn reset(&mut self) -> bool
Trait Implementations§
source§impl Clone for TimeoutContainer
impl Clone for TimeoutContainer
source§fn clone(&self) -> TimeoutContainer
fn clone(&self) -> TimeoutContainer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TimeoutContainer
impl Send for TimeoutContainer
impl Sync for TimeoutContainer
impl Unpin for TimeoutContainer
impl UnwindSafe for TimeoutContainer
Blanket Implementations§
§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