Struct icu_calendar::types::Time
source · pub struct Time {
pub hour: IsoHour,
pub minute: IsoMinute,
pub second: IsoSecond,
pub nanosecond: NanoSecond,
}
Expand description
A representation of a time in hours, minutes, seconds, and nanoseconds
Fields§
§hour: IsoHour
0-based hour.
minute: IsoMinute
0-based minute.
second: IsoSecond
0-based second.
nanosecond: NanoSecond
Fractional second
Implementations§
source§impl Time
impl Time
sourcepub const fn new(
hour: IsoHour,
minute: IsoMinute,
second: IsoSecond,
nanosecond: NanoSecond,
) -> Self
pub const fn new( hour: IsoHour, minute: IsoMinute, second: IsoSecond, nanosecond: NanoSecond, ) -> Self
Construct a new Time
, without validating that all components are in range
sourcepub fn try_new(
hour: u8,
minute: u8,
second: u8,
nanosecond: u32,
) -> Result<Self, CalendarError>
pub fn try_new( hour: u8, minute: u8, second: u8, nanosecond: u32, ) -> Result<Self, CalendarError>
Construct a new Time
, whilst validating that all components are in range
sourcepub(crate) fn from_minute_with_remainder_days(minute: i32) -> (Time, i32)
pub(crate) fn from_minute_with_remainder_days(minute: i32) -> (Time, i32)
Takes a number of minutes, which could be positive or negative, and returns the Time and the day number, which could be positive or negative.
Trait Implementations§
source§impl Ord for Time
impl Ord for Time
source§impl PartialEq for Time
impl PartialEq for Time
source§impl PartialOrd for Time
impl PartialOrd for Time
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Time
impl Eq 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 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