pub struct DurationStr(pub Duration);Expand description
A serde wrapper that (de)serializes as a strict human duration string.
Enable the “serde” feature to use this type.
Tuple Fields§
§0: DurationTrait Implementations§
Source§impl Clone for DurationStr
impl Clone for DurationStr
Source§fn clone(&self) -> DurationStr
fn clone(&self) -> DurationStr
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 DurationStr
impl Debug for DurationStr
Source§impl<'de> Deserialize<'de> for DurationStr
Available on crate feature serde only.
impl<'de> Deserialize<'de> for DurationStr
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DurationStr
impl PartialEq for DurationStr
Source§impl Serialize for DurationStr
Available on crate feature serde only.
impl Serialize for DurationStr
Available on crate feature
serde only.impl Copy for DurationStr
impl Eq for DurationStr
impl StructuralPartialEq for DurationStr
Auto Trait Implementations§
impl Freeze for DurationStr
impl RefUnwindSafe for DurationStr
impl Send for DurationStr
impl Sync for DurationStr
impl Unpin for DurationStr
impl UnwindSafe for DurationStr
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