pub struct DurableTimerRecord { /* private fields */ }Expand description
Complete durable timer history: one registration and at most one firing.
Implementations§
Source§impl DurableTimerRecord
impl DurableTimerRecord
Sourcepub const fn pending(timer: DurableTimer) -> Self
pub const fn pending(timer: DurableTimer) -> Self
Constructs an unfired durable timer.
Sourcepub fn restore(
timer: DurableTimer,
firing: Option<TimerFiring>,
) -> Result<Self, DurableWaitError>
pub fn restore( timer: DurableTimer, firing: Option<TimerFiring>, ) -> Result<Self, DurableWaitError>
Restores and validates the complete immutable history.
§Errors
Returns DurableWaitError::TimerRegistrationMismatch if a firing
belongs to another timer.
Sourcepub const fn timer(&self) -> &DurableTimer
pub const fn timer(&self) -> &DurableTimer
Returns the immutable timer registration.
Sourcepub const fn firing(&self) -> Option<&TimerFiring>
pub const fn firing(&self) -> Option<&TimerFiring>
Returns the committed firing, if present.
Sourcepub const fn is_pending(&self) -> bool
pub const fn is_pending(&self) -> bool
Returns whether the timer remains outstanding.
Trait Implementations§
Source§impl Clone for DurableTimerRecord
impl Clone for DurableTimerRecord
Source§impl Debug for DurableTimerRecord
impl Debug for DurableTimerRecord
Source§impl<'de> Deserialize<'de> for DurableTimerRecord
impl<'de> Deserialize<'de> for DurableTimerRecord
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DurableTimerRecord
Source§impl JsonSchema for DurableTimerRecord
impl JsonSchema for DurableTimerRecord
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DurableTimerRecord
impl PartialEq for DurableTimerRecord
Source§impl Serialize for DurableTimerRecord
impl Serialize for DurableTimerRecord
impl StructuralPartialEq for DurableTimerRecord
Auto Trait Implementations§
impl Forget for DurableTimerRecord
impl Freeze for DurableTimerRecord
impl Move for DurableTimerRecord
impl RefUnwindSafe for DurableTimerRecord
impl Send for DurableTimerRecord
impl Sync for DurableTimerRecord
impl Unpin for DurableTimerRecord
impl UnsafeUnpin for DurableTimerRecord
impl UnwindSafe for DurableTimerRecord
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