pub struct Date { /* private fields */ }
Expand description
A UTC timestamp used for serialization to and from the plist date type.
Note that while this type implements Serialize
and Deserialize
it will behave strangely if
used with serializers from outside this crate.
Implementations§
source§impl Date
impl Date
sourcepub fn from_xml_format(date: &str) -> Result<Self, InvalidXmlDate>
pub fn from_xml_format(date: &str) -> Result<Self, InvalidXmlDate>
Converts an XML plist date string to a Date
.
sourcepub fn to_xml_format(&self) -> String
pub fn to_xml_format(&self) -> String
Converts the Date
to an XML plist date string.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Date
impl<'de> Deserialize<'de> for Date
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Date> for SystemTime
impl From<Date> for SystemTime
source§impl From<SystemTime> for Date
impl From<SystemTime> for Date
source§fn from(date: SystemTime) -> Self
fn from(date: SystemTime) -> Self
Converts to this type from the input type.
source§impl PartialEq<Date> for Date
impl PartialEq<Date> for Date
impl Copy for Date
impl Eq for Date
impl StructuralEq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.