pub struct Registration<'timer, 'd> { /* private fields */ }Expand description
An owning timer registration. Its fixed-slot fast path overflows to an intrusive deadline queue. 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: Deadline<'d>) -> Self
pub fn is_armed(self: Pin<&Self>) -> bool
pub fn arm(self: Pin<&Self>, deadline: Deadline<'d>, wake: Waker<'d>)
pub fn poll(self: Pin<&Self>, now: Deadline<'d>, wake: Waker<'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