pub struct Date(/* private fields */);Expand description
An absolute point in time: a UTC instant with nanosecond precision.
Date exposes no time zone — every constructor normalizes to UTC at its
codec boundaries. The representable
range spans the years -9999 through 9999; values outside it (reachable
only through extreme binary-plist payloads) clamp to the nearest bound.
§Examples
use std::time::SystemTime;
use apple_plist::Date;
let now = SystemTime::now();
let date = Date::from(now);
assert_eq!(SystemTime::from(date), now);Trait Implementations§
impl Copy for Date
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
impl Eq for Date
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(value: SystemTime) -> Self
fn from(value: SystemTime) -> Self
Converts to this type from the input type.
Source§impl Ord for Date
impl Ord for Date
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin for Date
impl UnwindSafe for Date
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.