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 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 retains the declaration but cancels
its live callback.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Cancel the current schedule while retaining callback authority when configured.
Sourcepub fn unregister(self) -> Result<(), TimerError>
pub fn unregister(self) -> Result<(), TimerError>
Consume the claim and unregister its callback authority.
Auto Trait Implementations§
impl Freeze for OnceRegistration
impl RefUnwindSafe for OnceRegistration
impl Send for OnceRegistration
impl Sync for OnceRegistration
impl Unpin for OnceRegistration
impl UnsafeUnpin for OnceRegistration
impl UnwindSafe for OnceRegistration
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