pub struct OnceRegistration { /* private fields */ }Expand description
Opaque non-clone claim for one registered Once callback.
Implementations§
Source§impl OnceRegistration
impl OnceRegistration
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 provider wake-up.
This is a volatile observation, not durable scheduling authority or a
delivery guarantee. Call Self::ensure_scheduled unconditionally when
a wake-up is required rather than using this value as a scheduling guard.
Sourcepub fn ensure_scheduled(
&self,
schedule: TimerSchedule,
) -> Result<(), TimerError>
pub fn ensure_scheduled( &self, schedule: TimerSchedule, ) -> Result<(), TimerError>
Synchronously ensure one callback is scheduled.
Sourcepub fn reconcile_schedule(
&self,
schedule: Option<TimerSchedule>,
) -> Result<(), TimerError>
pub fn reconcile_schedule( &self, schedule: Option<TimerSchedule>, ) -> Result<(), TimerError>
Reconcile to one exact desired schedule, replacing a later or earlier live deadline as necessary.
None leaves a retained declaration inactive. A remove-on-stop
declaration is removed and this claim expires.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Cancel the current schedule.
A retained declaration keeps callback authority. A remove-on-stop declaration is removed and this claim expires.
Sourcepub fn unregister(self) -> Result<(), TimerError>
pub fn unregister(self) -> Result<(), TimerError>
Consume the claim and unregister its callback authority.