pub struct Duration(/* private fields */);Expand description
A length of time, ordered by length.
Implementations§
Trait Implementations§
Source§impl Display for Duration
The text form: PT, the seconds as a Decimal’s text, then S, as
abi.md’s canonical ISO 8601 form writes it: PT90S, PT0.25S, PT-5S.
impl Display for Duration
The text form: PT, the seconds as a Decimal’s text, then S, as
abi.md’s canonical ISO 8601 form writes it: PT90S, PT0.25S, PT-5S.
impl Eq for Duration
Source§impl FlowType for Duration
impl FlowType for Duration
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 Duration
impl Ord for Duration
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 Duration
impl PartialOrd for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnsafeUnpin for Duration
impl UnwindSafe for Duration
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