Struct toml::value::Datetime [−][src]
pub struct Datetime { /* fields omitted */ }
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
impl From<Datetime> for Value
[src]
impl From<Datetime> for Value
impl PartialEq for Datetime
[src]
impl PartialEq for Datetime
fn eq(&self, other: &Datetime) -> bool
[src]
fn eq(&self, other: &Datetime) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Datetime) -> bool
[src]
fn ne(&self, other: &Datetime) -> bool
This method tests for !=
.
impl Clone for Datetime
[src]
impl Clone for Datetime
fn clone(&self) -> Datetime
[src]
fn clone(&self) -> Datetime
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Datetime
[src]
impl Debug for Datetime
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for Datetime
[src]
impl Display for Datetime
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for Datetime
[src]
impl FromStr for Datetime
type Err = DatetimeParseError
The associated error which can be returned from parsing.
fn from_str(date: &str) -> Result<Datetime, DatetimeParseError>
[src]
fn from_str(date: &str) -> Result<Datetime, DatetimeParseError>
Parses a string s
to return a value of this type. Read more
impl Serialize for Datetime
[src]
impl Serialize for Datetime
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Datetime
[src]
impl<'de> Deserialize<'de> for Datetime
fn deserialize<D>(deserializer: D) -> Result<Datetime, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Datetime, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more