#[non_exhaustive]pub struct XsDateTime {
pub unix_us: i64,
pub fraction_digits: u8,
}Expand description
A parsed instant plus how finely the source stated it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.unix_us: i64Microseconds since 1970-01-01T00:00:00Z; sub-microsecond digits are truncated.
fraction_digits: u8Number of fraction digits the text carried (0 when none, capped at 9).
Implementations§
Source§impl XsDateTime
impl XsDateTime
Sourcepub fn resolution_us(&self) -> u64
pub fn resolution_us(&self) -> u64
The resolution the text implies, in microseconds: one second without a fraction, 10^(6 - digits) microseconds with one (1 for 6 or more digits).
Trait Implementations§
Source§impl Clone for XsDateTime
impl Clone for XsDateTime
Source§fn clone(&self) -> XsDateTime
fn clone(&self) -> XsDateTime
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 XsDateTime
Source§impl Debug for XsDateTime
impl Debug for XsDateTime
impl Eq for XsDateTime
Source§impl PartialEq for XsDateTime
impl PartialEq for XsDateTime
impl StructuralPartialEq for XsDateTime
Auto Trait Implementations§
impl Forget for XsDateTime
impl Freeze for XsDateTime
impl Move for XsDateTime
impl RefUnwindSafe for XsDateTime
impl Send for XsDateTime
impl Sync for XsDateTime
impl Unpin for XsDateTime
impl UnsafeUnpin for XsDateTime
impl UnwindSafe for XsDateTime
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