pub struct Datetime { /* private fields */ }
Expand description
A parsed TOML datetime value
This structure is intended to represent the datetime primitive type that can be encoded into TOML documents. This type is a parsed version that contains all metadata internally.
Currently this type is intentionally conservative and only supports
to_string
as an accessor. Over time though it’s intended that it’ll grow
more support!
Note that if you’re using Deserialize
to deserialize a TOML document, you
can use this as a placeholder for where you’re expecting a datetime to be
specified.
Also note though that while this type implements Serialize
and
Deserialize
it’s only recommended to use this type with the TOML format,
otherwise encoded in other formats it may look a little odd.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Datetime
impl<'de> Deserialize<'de> for Datetime
source§fn deserialize<D>(
deserializer: D,
) -> Result<Datetime, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Datetime, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Datetime
impl Serialize for Datetime
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Datetime
Auto Trait Implementations§
impl Freeze for Datetime
impl RefUnwindSafe for Datetime
impl Send for Datetime
impl Sync for Datetime
impl Unpin for Datetime
impl UnwindSafe for Datetime
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)