pub struct ExecutionTimestamps { /* private fields */ }Expand description
Validated creation, start, and end instants for an execution attempt.
Implementations§
Source§impl ExecutionTimestamps
impl ExecutionTimestamps
Sourcepub fn new(
created_at: SystemTime,
started_at: Option<SystemTime>,
ended_at: Option<SystemTime>,
) -> Result<Self, DomainError>
pub fn new( created_at: SystemTime, started_at: Option<SystemTime>, ended_at: Option<SystemTime>, ) -> Result<Self, DomainError>
Validates and constructs an execution timestamp snapshot.
§Errors
Returns DomainError::InvalidTimestampOrder when start precedes
creation or end precedes creation/start.
Sourcepub const fn created_at(self) -> SystemTime
pub const fn created_at(self) -> SystemTime
Returns the metadata creation instant.
Sourcepub const fn started_at(self) -> Option<SystemTime>
pub const fn started_at(self) -> Option<SystemTime>
Returns when user work began, when known.
Sourcepub const fn ended_at(self) -> Option<SystemTime>
pub const fn ended_at(self) -> Option<SystemTime>
Returns when the attempt ended, when known.
Trait Implementations§
Source§impl Clone for ExecutionTimestamps
impl Clone for ExecutionTimestamps
Source§fn clone(&self) -> ExecutionTimestamps
fn clone(&self) -> ExecutionTimestamps
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExecutionTimestamps
Source§impl Debug for ExecutionTimestamps
impl Debug for ExecutionTimestamps
impl Eq for ExecutionTimestamps
Source§impl Hash for ExecutionTimestamps
impl Hash for ExecutionTimestamps
Source§impl PartialEq for ExecutionTimestamps
impl PartialEq for ExecutionTimestamps
impl StructuralPartialEq for ExecutionTimestamps
Auto Trait Implementations§
impl Freeze for ExecutionTimestamps
impl RefUnwindSafe for ExecutionTimestamps
impl Send for ExecutionTimestamps
impl Sync for ExecutionTimestamps
impl Unpin for ExecutionTimestamps
impl UnsafeUnpin for ExecutionTimestamps
impl UnwindSafe for ExecutionTimestamps
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