pub struct Instant(/* private fields */);Expand description
A point in time, ordered chronologically.
Implementations§
Source§impl Instant
impl Instant
Sourcepub fn from_unix_seconds(seconds: Decimal) -> Instant
pub fn from_unix_seconds(seconds: Decimal) -> Instant
Returns the instant seconds after 1970-01-01T00:00:00Z.
Sourcepub fn unix_seconds(&self) -> &Decimal
pub fn unix_seconds(&self) -> &Decimal
Returns the offset in seconds from 1970-01-01T00:00:00Z.
Trait Implementations§
Source§impl Display for Instant
The text form: abi.md’s canonical ISO 8601 form, in UTC with the Z
suffix and the fewest fractional-second digits that are exact, such as
2026-03-21T09:30:00.25Z. A year outside 0000 to 9999 carries a sign
and at least four digits: +10000-01-01T00:00:00Z, -0001-12-31T00:00:00Z.
impl Display for Instant
The text form: abi.md’s canonical ISO 8601 form, in UTC with the Z
suffix and the fewest fractional-second digits that are exact, such as
2026-03-21T09:30:00.25Z. A year outside 0000 to 9999 carries a sign
and at least four digits: +10000-01-01T00:00:00Z, -0001-12-31T00:00:00Z.
impl Eq for Instant
Source§impl FlowType for Instant
impl FlowType for Instant
Source§fn decode_context(
codec: &ContextCodec,
value: &Json,
) -> Result<Self, DecodeError>
fn decode_context( codec: &ContextCodec, value: &Json, ) -> Result<Self, DecodeError>
Reads a value using the compiler-validated concrete call type.
Source§fn encode_context(&self, codec: &ContextCodec) -> Result<Json, DecodeError>
fn encode_context(&self, codec: &ContextCodec) -> Result<Json, DecodeError>
Writes a value using the compiler-validated concrete call type.
Source§fn encode_field(&self) -> Option<Json>
fn encode_field(&self) -> Option<Json>
Encodes a named field, including the special Option-field representation.
Source§fn decode_field(value: Option<&Json>) -> Result<Self, DecodeError>
fn decode_field(value: Option<&Json>) -> Result<Self, DecodeError>
Decodes a named field; Option aliases retain omission semantics.
Source§impl Ord for Instant
impl Ord for Instant
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Instant
impl PartialOrd for Instant
impl StructuralPartialEq for Instant
Auto Trait Implementations§
impl Freeze for Instant
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnsafeUnpin for Instant
impl UnwindSafe for Instant
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