pub struct Dur(pub Duration);Expand description
A duration deserialized from "10m" / "500ms" / bare seconds (string or
integer). Displays in the same string form.
Tuple Fields§
§0: DurationTrait Implementations§
impl Copy for Dur
Source§impl<'de> Deserialize<'de> for Dur
impl<'de> Deserialize<'de> for Dur
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Dur
Source§impl Ord for Dur
impl Ord for Dur
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
Source§impl PartialOrd for Dur
impl PartialOrd for Dur
impl StructuralPartialEq for Dur
Auto Trait Implementations§
impl Freeze for Dur
impl RefUnwindSafe for Dur
impl Send for Dur
impl Sync for Dur
impl Unpin for Dur
impl UnsafeUnpin for Dur
impl UnwindSafe for Dur
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