pub struct DurationAsStr;
Implementations§
Source§impl DurationAsStr
impl DurationAsStr
pub fn serialize<S>(x: &Duration, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
pub fn deserialize<'de, D>(deserializer: D) -> Result<Duration, D::Error>where
D: Deserializer<'de>,
Trait Implementations§
Source§impl<'de> DeserializeAs<'de, TimeDelta> for DurationAsStr
impl<'de> DeserializeAs<'de, TimeDelta> for DurationAsStr
Source§fn deserialize_as<D>(deserializer: D) -> Result<Duration, D::Error>where
D: Deserializer<'de>,
fn deserialize_as<D>(deserializer: D) -> Result<Duration, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer.
Source§impl JsonSchema for DurationAsStr
impl JsonSchema for DurationAsStr
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl SerializeAs<TimeDelta> for DurationAsStr
impl SerializeAs<TimeDelta> for DurationAsStr
Source§fn serialize_as<S>(x: &Duration, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize_as<S>(x: &Duration, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serialize this value into the given Serde serializer.
Auto Trait Implementations§
impl Freeze for DurationAsStr
impl RefUnwindSafe for DurationAsStr
impl Send for DurationAsStr
impl Sync for DurationAsStr
impl Unpin for DurationAsStr
impl UnwindSafe for DurationAsStr
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