pub struct IsoHour(/* private fields */);
Expand description
An ISO-8601 hour component, for use with ISO calendars.
Must be within inclusive bounds [0, 24]
. The value could be equal to 24 to
denote the end of a day, with the writing 24:00:00. It corresponds to the same
time as the next day at 00:00:00.
Implementations§
source§impl IsoHour
impl IsoHour
sourcepub fn try_add(self, other: u8) -> Option<IsoHour>
pub fn try_add(self, other: u8) -> Option<IsoHour>
Attempts to add two values.
Returns Some
if the sum is within bounds.
Returns None
if the sum is out of bounds.
Trait Implementations§
source§impl<C, A, Z> GetField<IsoHour> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<IsoHour> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl IntoOption<IsoHour> for IsoHour
impl IntoOption<IsoHour> for IsoHour
source§fn into_option(self) -> Option<IsoHour>
fn into_option(self) -> Option<IsoHour>
Return
self
as an Option<T>
source§impl Ord for IsoHour
impl Ord for IsoHour
source§impl PartialOrd for IsoHour
impl PartialOrd for IsoHour
impl Copy for IsoHour
impl Eq for IsoHour
impl StructuralPartialEq for IsoHour
Auto Trait Implementations§
impl Freeze for IsoHour
impl RefUnwindSafe for IsoHour
impl Send for IsoHour
impl Sync for IsoHour
impl Unpin for IsoHour
impl UnwindSafe for IsoHour
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more