Struct opening_hours_syntax::extended_time::ExtendedTime
source · pub struct ExtendedTime { /* private fields */ }
Implementations§
source§impl ExtendedTime
impl ExtendedTime
pub fn new(hour: u8, minute: u8) -> Self
pub fn hour(self) -> u8
pub fn minute(self) -> u8
pub fn add_minutes(self, minutes: i16) -> Result<Self, TryFromIntError>
pub fn add_hours(self, hours: i16) -> Result<Self, TryFromIntError>
pub fn from_mins_from_midnight(minute: u16) -> Result<Self, TryFromIntError>
pub fn mins_from_midnight(self) -> u16
Trait Implementations§
source§impl Clone for ExtendedTime
impl Clone for ExtendedTime
source§fn clone(&self) -> ExtendedTime
fn clone(&self) -> ExtendedTime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExtendedTime
impl Debug for ExtendedTime
source§impl From<NaiveTime> for ExtendedTime
impl From<NaiveTime> for ExtendedTime
source§fn from(time: NaiveTime) -> ExtendedTime
fn from(time: NaiveTime) -> ExtendedTime
Converts to this type from the input type.
source§impl Hash for ExtendedTime
impl Hash for ExtendedTime
source§impl Ord for ExtendedTime
impl Ord for ExtendedTime
source§fn cmp(&self, other: &ExtendedTime) -> Ordering
fn cmp(&self, other: &ExtendedTime) -> Ordering
1.21.0 · 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 ExtendedTime
impl PartialEq for ExtendedTime
source§fn eq(&self, other: &ExtendedTime) -> bool
fn eq(&self, other: &ExtendedTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ExtendedTime
impl PartialOrd for ExtendedTime
source§fn partial_cmp(&self, other: &ExtendedTime) -> Option<Ordering>
fn partial_cmp(&self, other: &ExtendedTime) -> Option<Ordering>
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 moresource§impl TryInto<NaiveTime> for ExtendedTime
impl TryInto<NaiveTime> for ExtendedTime
impl Copy for ExtendedTime
impl Eq for ExtendedTime
impl StructuralEq for ExtendedTime
impl StructuralPartialEq for ExtendedTime
Auto Trait Implementations§
impl RefUnwindSafe for ExtendedTime
impl Send for ExtendedTime
impl Sync for ExtendedTime
impl Unpin for ExtendedTime
impl UnwindSafe for ExtendedTime
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