pub struct RunTimer { /* private fields */ }Expand description
Immutable marker for one unresolved durable timer.
Implementations§
Source§impl RunTimer
impl RunTimer
Sourcepub fn new(
timer_id: TimerId,
kind: RunTimerKind,
scheduled_at: Timestamp,
due_at: Timestamp,
) -> Result<Self, RunTimerError>
pub fn new( timer_id: TimerId, kind: RunTimerKind, scheduled_at: Timestamp, due_at: Timestamp, ) -> Result<Self, RunTimerError>
Constructs a timer whose due instant is strictly after registration.
§Errors
Returns RunTimerError::DueNotAfterSchedule when the timer could fire
at or before its registration observation.
Sourcepub const fn kind(&self) -> RunTimerKind
pub const fn kind(&self) -> RunTimerKind
Returns the semantic timer purpose.
Sourcepub const fn scheduled_at(&self) -> Timestamp
pub const fn scheduled_at(&self) -> Timestamp
Returns the durable clock observation at registration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunTimer
impl<'de> Deserialize<'de> for RunTimer
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 RunTimer
Source§impl JsonSchema for RunTimer
impl JsonSchema for RunTimer
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 moreimpl StructuralPartialEq for RunTimer
Auto Trait Implementations§
impl Forget for RunTimer
impl Freeze for RunTimer
impl Move for RunTimer
impl RefUnwindSafe for RunTimer
impl Send for RunTimer
impl Sync for RunTimer
impl Unpin for RunTimer
impl UnsafeUnpin for RunTimer
impl UnwindSafe for RunTimer
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