Struct embedded_time::rate::Generic [−][src]
pub struct Generic<T> { /* fields omitted */ }
Expand description
The Generic
Rate
type allows an arbitrary scaling factor to be used without having to
impl FixedPoint
.
The purpose of this type is to allow a simple Rate
object that can be defined at run-time.
It does this by replacing the const
scaling factor with a struct field.
Implementations
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn to_generic<DestInt: TimeInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TryFrom<Self::T>,
fn to_generic<DestInt: TimeInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TryFrom<Self::T>,
fn to_duration<Duration: Duration>(&self) -> Result<Duration, ConversionError> where
Duration: FixedPoint,
Self: FixedPoint,
Duration::T: TryFrom<Self::T>,
fn to_duration<Duration: Duration>(&self) -> Result<Duration, ConversionError> where
Duration: FixedPoint,
Self: FixedPoint,
Duration::T: TryFrom<Self::T>,
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.