Struct serde_with::DurationNanoSeconds
source · [−]pub struct DurationNanoSeconds<FORMAT: Format = u64, STRICTNESS: Strictness = Strict>(_);
Expand description
Equivalent to DurationSeconds
with nano-seconds as base unit.
This type is equivalent to DurationSeconds
except that each unit represents 1 nano-second instead of 1 second for DurationSeconds
.
Trait Implementations
sourceimpl<FORMAT: Clone + Format, STRICTNESS: Clone + Strictness> Clone for DurationNanoSeconds<FORMAT, STRICTNESS>
impl<FORMAT: Clone + Format, STRICTNESS: Clone + Strictness> Clone for DurationNanoSeconds<FORMAT, STRICTNESS>
sourcefn clone(&self) -> DurationNanoSeconds<FORMAT, STRICTNESS>
fn clone(&self) -> DurationNanoSeconds<FORMAT, STRICTNESS>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<FORMAT: Debug + Format, STRICTNESS: Debug + Strictness> Debug for DurationNanoSeconds<FORMAT, STRICTNESS>
impl<FORMAT: Debug + Format, STRICTNESS: Debug + Strictness> Debug for DurationNanoSeconds<FORMAT, STRICTNESS>
sourceimpl<FORMAT: Default + Format, STRICTNESS: Default + Strictness> Default for DurationNanoSeconds<FORMAT, STRICTNESS>
impl<FORMAT: Default + Format, STRICTNESS: Default + Strictness> Default for DurationNanoSeconds<FORMAT, STRICTNESS>
sourcefn default() -> DurationNanoSeconds<FORMAT, STRICTNESS>
fn default() -> DurationNanoSeconds<FORMAT, STRICTNESS>
Returns the “default value” for a type. Read more
sourceimpl<'de> DeserializeAs<'de, Duration> for DurationNanoSeconds<u64, Strict>
impl<'de> DeserializeAs<'de, Duration> for DurationNanoSeconds<u64, Strict>
sourcefn 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.
sourceimpl<'de> DeserializeAs<'de, Duration> for DurationNanoSeconds<f64, Strict>
impl<'de> DeserializeAs<'de, Duration> for DurationNanoSeconds<f64, Strict>
sourcefn 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.
sourceimpl<'de> DeserializeAs<'de, Duration> for DurationNanoSeconds<String, Strict>
impl<'de> DeserializeAs<'de, Duration> for DurationNanoSeconds<String, Strict>
sourcefn 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.
sourceimpl<'de, FORMAT> DeserializeAs<'de, Duration> for DurationNanoSeconds<FORMAT, Flexible> where
FORMAT: Format,
impl<'de, FORMAT> DeserializeAs<'de, Duration> for DurationNanoSeconds<FORMAT, Flexible> where
FORMAT: Format,
sourcefn 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.
sourceimpl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<u64, STRICTNESS> where
STRICTNESS: Strictness,
impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<u64, STRICTNESS> where
STRICTNESS: Strictness,
sourcefn serialize_as<S>(source: &Duration, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
fn serialize_as<S>(source: &Duration, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer.
sourceimpl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<f64, STRICTNESS> where
STRICTNESS: Strictness,
impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<f64, STRICTNESS> where
STRICTNESS: Strictness,
sourcefn serialize_as<S>(source: &Duration, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
fn serialize_as<S>(source: &Duration, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer.
sourceimpl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<String, STRICTNESS> where
STRICTNESS: Strictness,
impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<String, STRICTNESS> where
STRICTNESS: Strictness,
sourcefn serialize_as<S>(source: &Duration, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
fn serialize_as<S>(source: &Duration, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer.
impl<FORMAT: Copy + Format, STRICTNESS: Copy + Strictness> Copy for DurationNanoSeconds<FORMAT, STRICTNESS>
Auto Trait Implementations
impl<FORMAT, STRICTNESS> RefUnwindSafe for DurationNanoSeconds<FORMAT, STRICTNESS> where
FORMAT: RefUnwindSafe,
STRICTNESS: RefUnwindSafe,
impl<FORMAT, STRICTNESS> Send for DurationNanoSeconds<FORMAT, STRICTNESS> where
FORMAT: Send,
STRICTNESS: Send,
impl<FORMAT, STRICTNESS> Sync for DurationNanoSeconds<FORMAT, STRICTNESS> where
FORMAT: Sync,
STRICTNESS: Sync,
impl<FORMAT, STRICTNESS> Unpin for DurationNanoSeconds<FORMAT, STRICTNESS> where
FORMAT: Unpin,
STRICTNESS: Unpin,
impl<FORMAT, STRICTNESS> UnwindSafe for DurationNanoSeconds<FORMAT, STRICTNESS> where
FORMAT: UnwindSafe,
STRICTNESS: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more