pub struct WatchdogRegistration { /* private fields */ }Expand description
Opaque non-clone claim for one pre-armed watchdog callback.
Implementations§
Source§impl WatchdogRegistration
impl WatchdogRegistration
Sourcepub const fn identity(&self) -> &TimerIdentity
pub const fn identity(&self) -> &TimerIdentity
Return the claimed logical identity.
Sourcepub fn has_armed_wakeup(&self) -> Result<bool, TimerError>
pub fn has_armed_wakeup(&self) -> Result<bool, TimerError>
Return whether this exact claim currently owns an armed scheduler wake-up.
The separately queued work callback is not itself a wake-up. During
watchdog work this returns true only because the scheduler has already
committed and installed the cadence successor. This is a volatile
observation, not a delivery guarantee.
Sourcepub fn ensure_scheduled(&self) -> Result<(), TimerError>
pub fn ensure_scheduled(&self) -> Result<(), TimerError>
Synchronously ensure one watchdog scheduler wake-up is authoritative.
An existing earlier immediate deadline is retained and never delayed.
Sourcepub fn ensure_scheduled_immediately(&self) -> Result<(), TimerError>
pub fn ensure_scheduled_immediately(&self) -> Result<(), TimerError>
Synchronously ensure one watchdog scheduler wake-up is due now.
An inactive declaration arms one zero-delay scheduler. A later cadence deadline is replaced in place; an already earlier or equivalent deadline and repeated immediate requests coalesce. If work is already dispatched, that zero-delay work satisfies the request. If work is running, the request applies to that attempt’s pre-armed successor.
Sourcepub fn reconcile_schedule(
&self,
schedule: Option<TimerSchedule>,
) -> Result<(), TimerError>
pub fn reconcile_schedule( &self, schedule: Option<TimerSchedule>, ) -> Result<(), TimerError>
Reconcile to one exact scheduler deadline, or cancel with None.
Unlike ensure, this can move a wake-up later. Identical deadlines coalesce. Dispatched or running work is not postponed: reconciliation selects its successor on normal completion. Until then, the committed cadence successor remains the recovery wake-up. A subsequent recovery attempt retires the interrupted attempt’s pending proposal.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Cancel the scheduler and any work callback that has not started.
Consumer work already running is not interrupted; normal completion clears its pre-armed successor. A retained declaration keeps callback authority. A remove-on-stop declaration and this claim expire when cancellation finalizes.
Sourcepub fn unregister(self) -> Result<(), TimerError>
pub fn unregister(self) -> Result<(), TimerError>
Consume the claim and unregister its callback authority.
When called from running work, removal is deferred until that invocation completes normally.