[−][src]Struct embedded_time::duration::time_units::Hours
See module-level documentation for details about this type
Trait Implementations
impl<Rep, RhsDur> Add<RhsDur> for Hours<Rep> where
RhsDur: Duration,
RhsDur::Rep: TimeRep,
Rep: TimeRep + TryFrom<RhsDur::Rep, Error: Debug>,
[src]
RhsDur: Duration,
RhsDur::Rep: TimeRep,
Rep: TimeRep + TryFrom<RhsDur::Rep, Error: Debug>,
See module-level documentation for details about this type
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: RhsDur) -> Self::Output
[src]
See module-level documentation for details about this type
impl<T: Clone + TimeRep> Clone for Hours<T>
[src]
fn clone(&self) -> Hours<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy + TimeRep> Copy for Hours<T>
[src]
impl<T: Debug + TimeRep> Debug for Hours<T>
[src]
impl<T: TimeRep> Display for Hours<T>
[src]
See module-level documentation for details about this type
fn fmt(&self, f: &mut Formatter) -> Result
[src]
See module-level documentation for details about this type
impl<Rep: TimeRep> Duration for Hours<Rep>
[src]
type Rep = Rep
fn new(value: Self::Rep) -> Self
[src]
fn count(self) -> Self::Rep
[src]
fn from_ticks<Rep>(ticks: Rep, period: Ratio<i32>) -> Option<Self> where
Self::Rep: TimeRep + TryFrom<Rep>,
Rep: TimeRep,
[src]
Self::Rep: TimeRep + TryFrom<Rep>,
Rep: TimeRep,
fn into_ticks<Rep>(self, period: Ratio<i32>) -> Option<Rep> where
Self::Rep: TimeRep,
Rep: TimeRep + TryFrom<Self::Rep>,
[src]
Self::Rep: TimeRep,
Rep: TimeRep + TryFrom<Self::Rep>,
#[must_use]fn min_value() -> Self::Rep
[src]
#[must_use]fn max_value() -> Self::Rep
[src]
fn wrapping_sub<Rhs>(self, rhs: Rhs) -> Option<Self> where
Self: TryConvertFrom<Rhs>,
Self::Rep: TryFrom<Rhs::Rep, Error: Debug>,
Rhs::Rep: TimeRep,
Rhs: Duration,
[src]
Self: TryConvertFrom<Rhs>,
Self::Rep: TryFrom<Rhs::Rep, Error: Debug>,
Rhs::Rep: TimeRep,
Rhs: Duration,
impl<T: Eq + TimeRep> Eq for Hours<T>
[src]
impl<T: Ord + TimeRep> Ord for Hours<T>
[src]
fn cmp(&self, other: &Hours<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<Rep, OtherDur> PartialEq<OtherDur> for Hours<Rep> where
Rep: TimeRep + TryFrom<OtherDur::Rep, Error: Debug>,
OtherDur: Duration,
OtherDur::Rep: TryFrom<Rep, Error: Debug>,
[src]
Rep: TimeRep + TryFrom<OtherDur::Rep, Error: Debug>,
OtherDur: Duration,
OtherDur::Rep: TryFrom<Rep, Error: Debug>,
See module-level documentation for details about this type
fn eq(&self, other: &OtherDur) -> bool
[src]
See module-level documentation for details about this type
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<Rep, OtherDur> PartialOrd<OtherDur> for Hours<Rep> where
Rep: TimeRep + TryFrom<OtherDur::Rep, Error: Debug>,
OtherDur: Duration,
OtherDur::Rep: TryFrom<Rep, Error: Debug>,
[src]
Rep: TimeRep + TryFrom<OtherDur::Rep, Error: Debug>,
OtherDur: Duration,
OtherDur::Rep: TryFrom<Rep, Error: Debug>,
See module-level documentation for details about this type
fn partial_cmp(&self, other: &OtherDur) -> Option<Ordering>
[src]
See module-level documentation for details about this type
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: TimeRep> Period for Hours<T>
[src]
See module-level documentation for details about this type
impl<T: TimeRep> StructuralEq for Hours<T>
[src]
impl<Rep, RhsDur> Sub<RhsDur> for Hours<Rep> where
Rep: TimeRep + TryFrom<RhsDur::Rep, Error: Debug>,
RhsDur: Duration,
[src]
Rep: TimeRep + TryFrom<RhsDur::Rep, Error: Debug>,
RhsDur: Duration,
See module-level documentation for details about this type
Auto Trait Implementations
impl<T> Send for Hours<T> where
T: Send,
T: Send,
impl<T> Sync for Hours<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Hours<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Source, Dest> TryConvertFrom<Source> for Dest where
Dest: Duration,
Source: Duration,
<Dest as Duration>::Rep: TimeRep,
<Dest as Duration>::Rep: TryFrom<<Source as Duration>::Rep>,
<<Dest as Duration>::Rep as TryFrom<<Source as Duration>::Rep>>::Error: Debug,
<Source as Duration>::Rep: TimeRep,
[src]
Dest: Duration,
Source: Duration,
<Dest as Duration>::Rep: TimeRep,
<Dest as Duration>::Rep: TryFrom<<Source as Duration>::Rep>,
<<Dest as Duration>::Rep as TryFrom<<Source as Duration>::Rep>>::Error: Debug,
<Source as Duration>::Rep: TimeRep,
fn try_convert_from(Source) -> Option<Dest>
[src]
Attempt to convert from one duration type to another
Both the underlying storage type and the LSbit period can be converted
Errors
- unable to cast underlying types
- LSbit period conversion overflow
Examples
assert_eq!(Seconds::<i32>::try_convert_from(Milliseconds(23_000_i64)), Some(Seconds(23_i32))); assert_eq!(Seconds::<i64>::try_convert_from(Milliseconds(23_000_i32)), Some(Seconds(23_i64)));
impl<Source, Dest> TryConvertInto<Dest> for Source where
Dest: Duration + TryConvertFrom<Source>,
Source: Duration,
[src]
Dest: Duration + TryConvertFrom<Source>,
Source: Duration,
fn try_convert_into(Self) -> Option<Dest>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,