pub struct DurableTimer { /* private fields */ }Expand description
Immutable timer committed with its registration journal fact.
Implementations§
Source§impl DurableTimer
impl DurableTimer
Sourcepub fn commit(
intent: TimerRegistrationIntent,
journal: JournalHead,
) -> Result<Self, DurableWaitError>
pub fn commit( intent: TimerRegistrationIntent, journal: JournalHead, ) -> Result<Self, DurableWaitError>
Materializes a timer at the authoritative journal observation.
§Errors
Returns DurableWaitError for scope/event substitution, a due time
not strictly after registration, or integrity failure.
Sourcepub fn restore(
intent: TimerRegistrationIntent,
marker: &RunTimer,
journal: JournalHead,
digest: Digest,
) -> Result<Self, DurableWaitError>
pub fn restore( intent: TimerRegistrationIntent, marker: &RunTimer, journal: JournalHead, digest: Digest, ) -> Result<Self, DurableWaitError>
Restores and verifies a persisted timer.
§Errors
Returns DurableWaitError::RecordDigestMismatch after mutation.
Sourcepub const fn intent(&self) -> &TimerRegistrationIntent
pub const fn intent(&self) -> &TimerRegistrationIntent
Returns the immutable pre-commit intent.
Sourcepub const fn journal(&self) -> &JournalHead
pub const fn journal(&self) -> &JournalHead
Returns the exact registration journal head.
Sourcepub fn head(&self) -> DurableTimerHead
pub fn head(&self) -> DurableTimerHead
Returns a compact integrity-verifiable firing anchor.
Trait Implementations§
Source§impl Clone for DurableTimer
impl Clone for DurableTimer
Source§impl Debug for DurableTimer
impl Debug for DurableTimer
Source§impl<'de> Deserialize<'de> for DurableTimer
impl<'de> Deserialize<'de> for DurableTimer
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 DurableTimer
Source§impl JsonSchema for DurableTimer
impl JsonSchema for DurableTimer
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 DurableTimer
impl PartialEq for DurableTimer
Source§impl Serialize for DurableTimer
impl Serialize for DurableTimer
impl StructuralPartialEq for DurableTimer
Auto Trait Implementations§
impl Forget for DurableTimer
impl Freeze for DurableTimer
impl Move for DurableTimer
impl RefUnwindSafe for DurableTimer
impl Send for DurableTimer
impl Sync for DurableTimer
impl Unpin for DurableTimer
impl UnsafeUnpin for DurableTimer
impl UnwindSafe for DurableTimer
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