pub struct UtcDateTime(/* private fields */);Expand description
A UTC-only second-precision timestamp.
All BDEW Redispatch 2.0 datetime fields must end with Z. This type
rejects any offset other than UTC at deserialization time.
Implementations§
Source§impl UtcDateTime
impl UtcDateTime
Sourcepub fn new(dt: OffsetDateTime) -> Result<Self, RedispatchXmlError>
pub fn new(dt: OffsetDateTime) -> Result<Self, RedispatchXmlError>
Create from an OffsetDateTime, returning an error if the offset is
not UTC.
Sourcepub fn inner(self) -> OffsetDateTime
pub fn inner(self) -> OffsetDateTime
Return the inner OffsetDateTime (always UTC).
Trait Implementations§
Source§impl Clone for UtcDateTime
impl Clone for UtcDateTime
Source§fn clone(&self) -> UtcDateTime
fn clone(&self) -> UtcDateTime
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 UtcDateTime
Source§impl Debug for UtcDateTime
impl Debug for UtcDateTime
Source§impl<'de> Deserialize<'de> for UtcDateTime
impl<'de> Deserialize<'de> for UtcDateTime
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UtcDateTime
Source§impl Ord for UtcDateTime
impl Ord for UtcDateTime
Source§fn cmp(&self, other: &UtcDateTime) -> Ordering
fn cmp(&self, other: &UtcDateTime) -> 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
Source§impl PartialEq for UtcDateTime
impl PartialEq for UtcDateTime
Source§fn eq(&self, other: &UtcDateTime) -> bool
fn eq(&self, other: &UtcDateTime) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for UtcDateTime
impl PartialOrd for UtcDateTime
Source§impl Serialize for UtcDateTime
impl Serialize for UtcDateTime
impl StructuralPartialEq for UtcDateTime
Auto Trait Implementations§
impl Freeze for UtcDateTime
impl RefUnwindSafe for UtcDateTime
impl Send for UtcDateTime
impl Sync for UtcDateTime
impl Unpin for UtcDateTime
impl UnsafeUnpin for UtcDateTime
impl UnwindSafe for UtcDateTime
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