pub struct CanonicalDateTime { /* private fields */ }Expand description
A timezone-free date and time.
Implementations§
Source§impl CanonicalDateTime
impl CanonicalDateTime
Sourcepub const fn new(date: CanonicalDate, time: CanonicalTime) -> Self
pub const fn new(date: CanonicalDate, time: CanonicalTime) -> Self
Construct from validated components.
Sourcepub const fn date(self) -> CanonicalDate
pub const fn date(self) -> CanonicalDate
Return the date component.
Sourcepub const fn time(self) -> CanonicalTime
pub const fn time(self) -> CanonicalTime
Return the time component.
Trait Implementations§
Source§impl Clone for CanonicalDateTime
impl Clone for CanonicalDateTime
Source§fn clone(&self) -> CanonicalDateTime
fn clone(&self) -> CanonicalDateTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CanonicalDateTime
Source§impl Debug for CanonicalDateTime
impl Debug for CanonicalDateTime
Source§impl<'de> Deserialize<'de> for CanonicalDateTime
impl<'de> Deserialize<'de> for CanonicalDateTime
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 Display for CanonicalDateTime
impl Display for CanonicalDateTime
impl Eq for CanonicalDateTime
Source§impl FromStr for CanonicalDateTime
impl FromStr for CanonicalDateTime
Source§impl Hash for CanonicalDateTime
impl Hash for CanonicalDateTime
Source§impl Ord for CanonicalDateTime
impl Ord for CanonicalDateTime
Source§fn cmp(&self, other: &CanonicalDateTime) -> Ordering
fn cmp(&self, other: &CanonicalDateTime) -> Ordering
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CanonicalDateTime
impl PartialEq for CanonicalDateTime
Source§impl PartialOrd for CanonicalDateTime
impl PartialOrd for CanonicalDateTime
Source§impl Serialize for CanonicalDateTime
impl Serialize for CanonicalDateTime
impl StructuralPartialEq for CanonicalDateTime
Auto Trait Implementations§
impl Freeze for CanonicalDateTime
impl RefUnwindSafe for CanonicalDateTime
impl Send for CanonicalDateTime
impl Sync for CanonicalDateTime
impl Unpin for CanonicalDateTime
impl UnsafeUnpin for CanonicalDateTime
impl UnwindSafe for CanonicalDateTime
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