pub struct Alarm<'d, const STARTED: bool = false> { /* private fields */ }Expand description
A resident alarm tied to one exact driver generation.
Implementations§
Source§impl<'d> Alarm<'d>
impl<'d> Alarm<'d>
pub fn is_armed(&self) -> bool
pub fn arm(&self, due: Deadline<'d>, target: Waker<'d>)
Sourcepub fn arm_and_poll(
&self,
due: Deadline<'d>,
now: Moment<'d>,
target: Waker<'d>,
) -> Poll<()>
pub fn arm_and_poll( &self, due: Deadline<'d>, now: Moment<'d>, target: Waker<'d>, ) -> Poll<()>
Replaces this deadline and polls it in one command, retaining the slot.
pub fn poll_after( &self, delay: &Duration, now: Moment<'d>, target: Waker<'d>, ) -> Poll<()>
pub fn pending_in( self, delay: &Duration, now: Moment<'d>, target: Waker<'d>, ) -> Option<Alarm<'d, true>>
pub fn poll_until( &self, due: &Deadline<'d>, now: Moment<'d>, target: Waker<'d>, ) -> Poll<()>
pub fn poll(&self, now: Moment<'d>, target: Waker<'d>) -> Poll<()>
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl<'d, const STARTED: bool = false> !RefUnwindSafe for Alarm<'d, STARTED>
impl<'d, const STARTED: bool = false> !Send for Alarm<'d, STARTED>
impl<'d, const STARTED: bool = false> !Sync for Alarm<'d, STARTED>
impl<'d, const STARTED: bool = false> !UnwindSafe for Alarm<'d, STARTED>
impl<'d, const STARTED: bool> Forget for Alarm<'d, STARTED>
impl<'d, const STARTED: bool> Freeze for Alarm<'d, STARTED>where
Root<'d, Shared<Context<Receive>>>: Freeze,
PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: Freeze,
Lease<'d, Tag>: Freeze,
PhantomData<Open>: Freeze,
impl<'d, const STARTED: bool> Move for Alarm<'d, STARTED>
impl<'d, const STARTED: bool> Unpin for Alarm<'d, STARTED>
impl<'d, const STARTED: bool> UnsafeUnpin for Alarm<'d, STARTED>where
Root<'d, Shared<Context<Receive>>>: UnsafeUnpin,
PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: UnsafeUnpin,
Lease<'d, Tag>: UnsafeUnpin,
PhantomData<Open>: UnsafeUnpin,
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