pub enum SystemTimeGenerationMode {
Now,
UnixEpoch,
Offset {
seconds: i64,
nanos: u32,
},
}Expand description
Generation mode for SystemTime.
This enum allows an agent (or user) to specify how to create a SystemTime:
Now: Current system timeUnixEpoch: Unix epoch (1970-01-01 00:00:00 UTC)Offset: Time offset from a reference point by seconds and nanoseconds
Variants§
Now
Use current system time (SystemTime::now()).
UnixEpoch
Use Unix epoch (UNIX_EPOCH constant).
Offset
Offset from reference time.
Positive seconds = future, negative = past. Nanoseconds are always added to the absolute value.
Trait Implementations§
Source§impl Clone for SystemTimeGenerationMode
impl Clone for SystemTimeGenerationMode
Source§fn clone(&self) -> SystemTimeGenerationMode
fn clone(&self) -> SystemTimeGenerationMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemTimeGenerationMode
impl Debug for SystemTimeGenerationMode
Source§impl Elicitation for SystemTimeGenerationMode
impl Elicitation for SystemTimeGenerationMode
Source§async fn elicit(client: &ElicitClient) -> ElicitResult<Self>
async fn elicit(client: &ElicitClient) -> ElicitResult<Self>
Elicit a value of this type from the user via style-aware client. Read more
Source§fn with_style(style: Self::Style) -> ElicitBuilder<Self>
fn with_style(style: Self::Style) -> ElicitBuilder<Self>
Create a builder for one-off style override. Read more
Source§fn elicit_proven(
client: &ElicitClient,
) -> impl Future<Output = ElicitResult<(Self, Established<Is<Self>>)>> + Send
fn elicit_proven( client: &ElicitClient, ) -> impl Future<Output = ElicitResult<(Self, Established<Is<Self>>)>> + Send
Elicit a value with proof it inhabits type Self. Read more
Source§impl Hash for SystemTimeGenerationMode
impl Hash for SystemTimeGenerationMode
Source§impl PartialEq for SystemTimeGenerationMode
impl PartialEq for SystemTimeGenerationMode
Source§impl Prompt for SystemTimeGenerationMode
impl Prompt for SystemTimeGenerationMode
Source§impl Select for SystemTimeGenerationMode
impl Select for SystemTimeGenerationMode
impl Copy for SystemTimeGenerationMode
impl Eq for SystemTimeGenerationMode
impl StructuralPartialEq for SystemTimeGenerationMode
Auto Trait Implementations§
impl Freeze for SystemTimeGenerationMode
impl RefUnwindSafe for SystemTimeGenerationMode
impl Send for SystemTimeGenerationMode
impl Sync for SystemTimeGenerationMode
impl Unpin for SystemTimeGenerationMode
impl UnwindSafe for SystemTimeGenerationMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> WithContract for T
impl<T> WithContract for T
Source§fn with_contract<C>(contract: C) -> ContractedElicitation<Self, C>
fn with_contract<C>(contract: C) -> ContractedElicitation<Self, C>
Attach a contract to this type’s elicitation. Read more