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.
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.