pub struct TimerControl { /* private fields */ }Expand description
Pure state machine for one logical timer identity.
Implementations§
Source§impl TimerControl
impl TimerControl
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Return the latest allocated callback generation.
Sourcepub const fn registration(&self) -> TimerRegistration
pub const fn registration(&self) -> TimerRegistration
Return the current logical registration.
Sourcepub fn schedule(
&mut self,
deadline_ns: u64,
) -> Result<TimerControlAction, TimerControlError>
pub fn schedule( &mut self, deadline_ns: u64, ) -> Result<TimerControlAction, TimerControlError>
Schedule a deadline, retaining an already scheduled earlier deadline.
Sourcepub fn cancel(&mut self) -> Result<TimerControlAction, TimerControlError>
pub fn cancel(&mut self) -> Result<TimerControlAction, TimerControlError>
Cancel this timer, deferring cancellation safely when a callback runs.
Sourcepub fn reconcile(
&mut self,
deadline_ns: u64,
) -> Result<TimerControlAction, TimerControlError>
pub fn reconcile( &mut self, deadline_ns: u64, ) -> Result<TimerControlAction, TimerControlError>
Reconcile this timer to one authoritative deadline.
Sourcepub const fn begin(&mut self, generation: u64) -> bool
pub const fn begin(&mut self, generation: u64) -> bool
Begin the scheduled generation, rejecting stale callbacks.
Sourcepub fn complete(
&mut self,
generation: u64,
directive_deadline_ns: Option<u64>,
) -> Result<TimerControlAction, TimerControlError>
pub fn complete( &mut self, generation: u64, directive_deadline_ns: Option<u64>, ) -> Result<TimerControlAction, TimerControlError>
Complete the running generation and arbitrate its proposed successor against commands received during execution.
Trait Implementations§
Source§impl Debug for TimerControl
impl Debug for TimerControl
Source§impl Default for TimerControl
impl Default for TimerControl
Source§fn default() -> TimerControl
fn default() -> TimerControl
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TimerControl
impl RefUnwindSafe for TimerControl
impl Send for TimerControl
impl Sync for TimerControl
impl Unpin for TimerControl
impl UnsafeUnpin for TimerControl
impl UnwindSafe for TimerControl
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