pub struct Alarm<'d> { /* 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.
Sourcepub fn arm_owned<'a>(
&'a mut self,
due: Deadline<'d>,
now: Moment<'d>,
target: Waker<'d>,
) -> Poll<'a, 'd>
pub fn arm_owned<'a>( &'a mut self, due: Deadline<'d>, now: Moment<'d>, target: Waker<'d>, ) -> Poll<'a, 'd>
Replaces and polls this deadline, retaining exclusive proof while pending.
pub fn poll(&self, now: Moment<'d>, target: Waker<'d>) -> Poll<()>
pub fn clear(&self)
Auto Trait Implementations§
impl<'d> !RefUnwindSafe for Alarm<'d>
impl<'d> !Send for Alarm<'d>
impl<'d> !Sync for Alarm<'d>
impl<'d> !UnwindSafe for Alarm<'d>
impl<'d> Freeze for Alarm<'d>
impl<'d> Unpin for Alarm<'d>
impl<'d> UnsafeUnpin for Alarm<'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