pub(crate) fn serialize_duration<S>(duration: &Duration, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    format!("{}", duration.as_nanos()).serialize(serializer)
}
/// Serialize `Duration` as a JSON string containing a nanosecond count
Serialize `Duration` as a JSON string containing a nanosecond count
Serialize ` Duration ` as a JSON string containing a nanosecond count
pub(crate) fn serialize_duration<S>(duration: &Duration, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    format!("{}", duration.as_nanos()).serialize(serializer)
}
pub ( crate ) fn serialize_duration < S > ( duration : & Duration , serializer : S ) -> Result < S :: Ok , S :: Error > where S : Serializer , { format ! ( " " duration as_nanos ( ) ) . serialize ( serializer ) }
Serialize `Duration` as a JSON string containing a nanosecond count
Serialize ` Duration ` as a JSON string containing a nanosecond count
duration
&Duration
serializer
S
duration
&Duration
serializer
S