pub struct Registration<'timer, 'd> { /* private fields */ }Expand description
An owning, starvation-safe timer registration.
The registration keeps the timer ticket linear and falls back to the driver’s intrusive deadline queue when all fixed timer slots are busy. Consequently timer capacity is a performance bound, never a correctness bound.
Implementations§
Source§impl<'timer, 'd> Registration<'timer, 'd>
impl<'timer, 'd> Registration<'timer, 'd>
pub fn new(timer: &'timer Timer<'d>) -> Self
pub fn with_deadline(timer: &'timer Timer<'d>, deadline: Instant) -> Self
pub fn is_armed(self: Pin<&Self>) -> bool
pub fn arm(self: Pin<&Self>, deadline: Instant, wake: CompletionWaker<'d>)
pub fn poll( self: Pin<&Self>, now: Instant, wake: CompletionWaker<'d>, ) -> Poll<()>
pub fn cancel(self: Pin<&Self>) -> bool
Trait Implementations§
Source§impl<'timer, 'd> Drop for Registration<'timer, 'd>
impl<'timer, 'd> Drop for Registration<'timer, 'd>
Auto Trait Implementations§
impl<'timer, 'd> !Freeze for Registration<'timer, 'd>
impl<'timer, 'd> !RefUnwindSafe for Registration<'timer, 'd>
impl<'timer, 'd> !Send for Registration<'timer, 'd>
impl<'timer, 'd> !Sync for Registration<'timer, 'd>
impl<'timer, 'd> !UnsafeUnpin for Registration<'timer, 'd>
impl<'timer, 'd> !UnwindSafe for Registration<'timer, 'd>
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