pub struct XsdDateTime {
pub year: i32,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub nanos: u32,
pub tz_min: Option<i16>,
}Fields§
§year: i32Year — can be negative, can exceed 4 digits. Year zero is illegal per XSD §3.2.7.
month: u8§day: u8§hour: u8§minute: u8§second: u8§nanos: u32Fractional seconds in nanoseconds (0..1_000_000_000).
tz_min: Option<i16>Offset from UTC in minutes (-840..=840). None = no timezone.
Implementations§
Source§impl XsdDateTime
impl XsdDateTime
Sourcepub fn to_utc_seconds(&self) -> Option<(i128, u32)>
pub fn to_utc_seconds(&self) -> Option<(i128, u32)>
Convert to a UTC instant in (year, day-of-year-style) units. Returns the number of seconds since 0001-01-01T00:00:00 UTC, after applying the timezone offset. Fractional seconds in nanos.
Trait Implementations§
Source§impl Clone for XsdDateTime
impl Clone for XsdDateTime
Source§fn clone(&self) -> XsdDateTime
fn clone(&self) -> XsdDateTime
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 XsdDateTime
Source§impl Debug for XsdDateTime
impl Debug for XsdDateTime
impl Eq for XsdDateTime
Source§impl Hash for XsdDateTime
impl Hash for XsdDateTime
Source§impl Ord for XsdDateTime
impl Ord for XsdDateTime
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 XsdDateTime
impl PartialEq for XsdDateTime
Source§fn eq(&self, other: &XsdDateTime) -> bool
fn eq(&self, other: &XsdDateTime) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for XsdDateTime
impl PartialOrd for XsdDateTime
impl StructuralPartialEq for XsdDateTime
Auto Trait Implementations§
impl Freeze for XsdDateTime
impl RefUnwindSafe for XsdDateTime
impl Send for XsdDateTime
impl Sync for XsdDateTime
impl Unpin for XsdDateTime
impl UnsafeUnpin for XsdDateTime
impl UnwindSafe for XsdDateTime
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