pub struct WatchdogContext { /* private fields */ }Expand description
Delegated control capability scoped to one exact watchdog work attempt.
Mutation authority expires when the callback completes. Retain the
WatchdogRegistration for longer-lived ownership.
Implementations§
Source§impl WatchdogContext
impl WatchdogContext
Sourcepub const fn identity(&self) -> &TimerIdentity
pub const fn identity(&self) -> &TimerIdentity
Return the logical timer identity executing this work.
Sourcepub fn ensure_scheduled(&self) -> Result<(), TimerError>
pub fn ensure_scheduled(&self) -> Result<(), TimerError>
Request that the pre-armed cadence successor remain scheduled.
This is idempotent unless it supersedes a nested cancellation request. It never arms an additional Watchdog successor.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Request cancellation while this exact work attempt is active.
Cancellation does not interrupt the current invocation; normal completion clears the already-armed successor when cancellation wins. A retained declaration becomes inactive; a remove-on-stop declaration is removed.
Auto Trait Implementations§
impl Freeze for WatchdogContext
impl RefUnwindSafe for WatchdogContext
impl Send for WatchdogContext
impl Sync for WatchdogContext
impl Unpin for WatchdogContext
impl UnsafeUnpin for WatchdogContext
impl UnwindSafe for WatchdogContext
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