pub struct TimerRegistrationIntent { /* private fields */ }Expand description
Pre-commit request to register one durable timer.
Implementations§
Source§impl TimerRegistrationIntent
impl TimerRegistrationIntent
Sourcepub fn new(
tenant_id: TenantId,
run_id: RunId,
timer_id: TimerId,
registration_event_id: EventId,
kind: RunTimerKind,
due_at: Timestamp,
) -> Result<Self, DurableWaitError>
pub fn new( tenant_id: TenantId, run_id: RunId, timer_id: TimerId, registration_event_id: EventId, kind: RunTimerKind, due_at: Timestamp, ) -> Result<Self, DurableWaitError>
Constructs an immutable timer-registration intent.
The inclusive due time is checked against the authoritative database
observation when DurableTimer::commit materializes the timer.
§Errors
Returns DurableWaitError::CanonicalSerialization if the integrity
preimage cannot be encoded canonically.
Sourcepub fn restore(
tenant_id: TenantId,
run_id: RunId,
timer_id: TimerId,
registration_event_id: EventId,
kind: RunTimerKind,
due_at: Timestamp,
intent_digest: Digest,
) -> Result<Self, DurableWaitError>
pub fn restore( tenant_id: TenantId, run_id: RunId, timer_id: TimerId, registration_event_id: EventId, kind: RunTimerKind, due_at: Timestamp, intent_digest: Digest, ) -> Result<Self, DurableWaitError>
Restores and verifies a persisted timer intent.
§Errors
Returns DurableWaitError::IntentDigestMismatch after mutation.
Sourcepub const fn registration_event_id(&self) -> EventId
pub const fn registration_event_id(&self) -> EventId
Returns the exact event that must register this timer.
Sourcepub const fn kind(&self) -> RunTimerKind
pub const fn kind(&self) -> RunTimerKind
Returns the protocol-neutral timer purpose.
Sourcepub const fn intent_digest(&self) -> Digest
pub const fn intent_digest(&self) -> Digest
Returns the semantic idempotency checksum.
Trait Implementations§
Source§impl Clone for TimerRegistrationIntent
impl Clone for TimerRegistrationIntent
Source§impl Debug for TimerRegistrationIntent
impl Debug for TimerRegistrationIntent
Source§impl<'de> Deserialize<'de> for TimerRegistrationIntent
impl<'de> Deserialize<'de> for TimerRegistrationIntent
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 TimerRegistrationIntent
Source§impl JsonSchema for TimerRegistrationIntent
impl JsonSchema for TimerRegistrationIntent
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 TimerRegistrationIntent
impl PartialEq for TimerRegistrationIntent
Source§impl Serialize for TimerRegistrationIntent
impl Serialize for TimerRegistrationIntent
impl StructuralPartialEq for TimerRegistrationIntent
Auto Trait Implementations§
impl Forget for TimerRegistrationIntent
impl Freeze for TimerRegistrationIntent
impl Move for TimerRegistrationIntent
impl RefUnwindSafe for TimerRegistrationIntent
impl Send for TimerRegistrationIntent
impl Sync for TimerRegistrationIntent
impl Unpin for TimerRegistrationIntent
impl UnsafeUnpin for TimerRegistrationIntent
impl UnwindSafe for TimerRegistrationIntent
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