pub struct Time { /* private fields */ }Expand description
Time component of a YAML 1.1 Timestamp.
Implementations§
Source§impl Time
impl Time
Sourcepub fn from_hms_nano_offset(
hour: u8,
minute: u8,
second: u8,
nanosecond: u32,
offset: Option<TimeZoneOffset>,
) -> Option<Self>
pub fn from_hms_nano_offset( hour: u8, minute: u8, second: u8, nanosecond: u32, offset: Option<TimeZoneOffset>, ) -> Option<Self>
Creates a time value if all components are valid.
Sourcepub const fn second(&self) -> u8
pub const fn second(&self) -> u8
Returns the second, allowing 60 for YAML 1.1 leap-second spellings.
Sourcepub const fn nanosecond(&self) -> u32
pub const fn nanosecond(&self) -> u32
Returns the fractional second in nanoseconds.
Sourcepub const fn offset(&self) -> Option<TimeZoneOffset>
pub const fn offset(&self) -> Option<TimeZoneOffset>
Returns the UTC offset when the source timestamp included one.
Trait Implementations§
impl Copy for Time
impl Eq for Time
Source§impl Ord for Time
impl Ord for Time
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 Time
impl PartialOrd for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnsafeUnpin for Time
impl UnwindSafe for Time
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