pub struct Serde<T>(/* private fields */);
Expand description
A wrapper type which implements Serialize
and Deserialize
for
types involving SystemTime
and Duration
.
Implementations§
Source§impl<T> Serde<T>
impl<T> Serde<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the De
, returning the inner value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Serde<Duration>
impl<'de> Deserialize<'de> for Serde<Duration>
Source§fn deserialize<D>(d: D) -> Result<Serde<Duration>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Serde<Duration>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Serde<Option<Duration>>
impl<'de> Deserialize<'de> for Serde<Option<Duration>>
Source§fn deserialize<D>(d: D) -> Result<Serde<Option<Duration>>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Serde<Option<Duration>>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Serde<Option<SystemTime>>
impl<'de> Deserialize<'de> for Serde<Option<SystemTime>>
Source§fn deserialize<D>(d: D) -> Result<Serde<Option<SystemTime>>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Serde<Option<SystemTime>>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Serde<SystemTime>
impl<'de> Deserialize<'de> for Serde<SystemTime>
Source§fn deserialize<D>(d: D) -> Result<Serde<SystemTime>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Serde<SystemTime>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Serialize for Serde<&'a SystemTime>
impl<'a> Serialize for Serde<&'a SystemTime>
Source§impl Serialize for Serde<SystemTime>
impl Serialize for Serde<SystemTime>
impl<T: Copy> Copy for Serde<T>
impl<T: Eq> Eq for Serde<T>
impl<T> StructuralPartialEq for Serde<T>
Auto Trait Implementations§
impl<T> Freeze for Serde<T>where
T: Freeze,
impl<T> RefUnwindSafe for Serde<T>where
T: RefUnwindSafe,
impl<T> Send for Serde<T>where
T: Send,
impl<T> Sync for Serde<T>where
T: Sync,
impl<T> Unpin for Serde<T>where
T: Unpin,
impl<T> UnwindSafe for Serde<T>where
T: UnwindSafe,
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