[−][src]Struct fixnum::FixedPoint
Abstraction over fixed point numbers of arbitrary (but only compile-time specified) size and precision.
The internal representation is a fixed point decimal number,
an integer value pre-multiplied by 10 ^ PRECISION
,
where PRECISION
is a compile-time-defined decimal places count.
Maximal possible value: MAX = (2 ^ (BITS_COUNT - 1) - 1) / 10 ^ PRECISION
Maximal possible calculation error: ERROR_MAX = 0.5 / (10 ^ PRECISION)
E.g. for i64
with 9 decimal places:
MAX = (2 ^ (64 - 1) - 1) / 1e9 = 9223372036.854775807 ~ 9.2e9
ERROR_MAX = 0.5 / 1e9 = 5e-10
Implementations
impl<I, P> FixedPoint<I, P>
[src]
impl<P: Precision> FixedPoint<i16, P>
[src]
impl<P: Precision> FixedPoint<i16, P>
[src]
pub fn recip(
self,
mode: RoundMode
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
self,
mode: RoundMode
) -> Result<FixedPoint<i16, P>, ArithmeticError>
pub fn cneg(self) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
Checked negation. Returns Err
on overflow (you can't negate MIN
value).
pub fn half_sum(
a: FixedPoint<i16, P>,
b: FixedPoint<i16, P>
) -> FixedPoint<i16, P>
[src]
a: FixedPoint<i16, P>,
b: FixedPoint<i16, P>
) -> FixedPoint<i16, P>
pub fn integral(self, mode: RoundMode) -> i16
[src]
pub fn round_towards_zero_by(
self,
precision: FixedPoint<i16, P>
) -> FixedPoint<i16, P>
[src]
self,
precision: FixedPoint<i16, P>
) -> FixedPoint<i16, P>
pub fn next_power_of_ten(self) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
pub fn rounding_from_f64(
value: f64
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
value: f64
) -> Result<FixedPoint<i16, P>, ArithmeticError>
pub fn to_f64(self) -> f64
[src]
pub fn rounding_to_i64(self) -> i64
[src]
impl<P: Precision> FixedPoint<i16, P>
[src]
pub fn from_decimal(
mantissa: i16,
exponent: i32
) -> Result<FixedPoint<i16, P>, FromDecimalError>
[src]
mantissa: i16,
exponent: i32
) -> Result<FixedPoint<i16, P>, FromDecimalError>
impl<P: Precision> FixedPoint<i32, P>
[src]
impl<P: Precision> FixedPoint<i32, P>
[src]
pub fn recip(
self,
mode: RoundMode
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
self,
mode: RoundMode
) -> Result<FixedPoint<i32, P>, ArithmeticError>
pub fn cneg(self) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
Checked negation. Returns Err
on overflow (you can't negate MIN
value).
pub fn half_sum(
a: FixedPoint<i32, P>,
b: FixedPoint<i32, P>
) -> FixedPoint<i32, P>
[src]
a: FixedPoint<i32, P>,
b: FixedPoint<i32, P>
) -> FixedPoint<i32, P>
pub fn integral(self, mode: RoundMode) -> i32
[src]
pub fn round_towards_zero_by(
self,
precision: FixedPoint<i32, P>
) -> FixedPoint<i32, P>
[src]
self,
precision: FixedPoint<i32, P>
) -> FixedPoint<i32, P>
pub fn next_power_of_ten(self) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
pub fn rounding_from_f64(
value: f64
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
value: f64
) -> Result<FixedPoint<i32, P>, ArithmeticError>
pub fn to_f64(self) -> f64
[src]
pub fn rounding_to_i64(self) -> i64
[src]
impl<P: Precision> FixedPoint<i32, P>
[src]
pub fn from_decimal(
mantissa: i32,
exponent: i32
) -> Result<FixedPoint<i32, P>, FromDecimalError>
[src]
mantissa: i32,
exponent: i32
) -> Result<FixedPoint<i32, P>, FromDecimalError>
impl<P: Precision> FixedPoint<i64, P>
[src]
impl<P: Precision> FixedPoint<i64, P>
[src]
pub fn recip(
self,
mode: RoundMode
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
self,
mode: RoundMode
) -> Result<FixedPoint<i64, P>, ArithmeticError>
pub fn cneg(self) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
Checked negation. Returns Err
on overflow (you can't negate MIN
value).
pub fn half_sum(
a: FixedPoint<i64, P>,
b: FixedPoint<i64, P>
) -> FixedPoint<i64, P>
[src]
a: FixedPoint<i64, P>,
b: FixedPoint<i64, P>
) -> FixedPoint<i64, P>
pub fn integral(self, mode: RoundMode) -> i64
[src]
pub fn round_towards_zero_by(
self,
precision: FixedPoint<i64, P>
) -> FixedPoint<i64, P>
[src]
self,
precision: FixedPoint<i64, P>
) -> FixedPoint<i64, P>
pub fn next_power_of_ten(self) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
pub fn rounding_from_f64(
value: f64
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
value: f64
) -> Result<FixedPoint<i64, P>, ArithmeticError>
pub fn to_f64(self) -> f64
[src]
pub fn rounding_to_i64(self) -> i64
[src]
impl<P: Precision> FixedPoint<i64, P>
[src]
pub fn from_decimal(
mantissa: i64,
exponent: i32
) -> Result<FixedPoint<i64, P>, FromDecimalError>
[src]
mantissa: i64,
exponent: i32
) -> Result<FixedPoint<i64, P>, FromDecimalError>
Trait Implementations
impl<P: Precision> CheckedAdd<FixedPoint<i16, P>> for FixedPoint<i16, P>
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn cadd(
self,
rhs: FixedPoint<i16, P>
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i16, P>
) -> Result<FixedPoint<i16, P>, ArithmeticError>
impl<P: Precision> CheckedAdd<FixedPoint<i32, P>> for FixedPoint<i32, P>
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn cadd(
self,
rhs: FixedPoint<i32, P>
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i32, P>
) -> Result<FixedPoint<i32, P>, ArithmeticError>
impl<P: Precision> CheckedAdd<FixedPoint<i64, P>> for FixedPoint<i64, P>
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn cadd(
self,
rhs: FixedPoint<i64, P>
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i64, P>
) -> Result<FixedPoint<i64, P>, ArithmeticError>
impl<P: Precision> CheckedMul<FixedPoint<i16, P>> for i16
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn cmul(
self,
rhs: FixedPoint<i16, P>
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i16, P>
) -> Result<FixedPoint<i16, P>, ArithmeticError>
impl<P: Precision> CheckedMul<FixedPoint<i32, P>> for i32
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn cmul(
self,
rhs: FixedPoint<i32, P>
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i32, P>
) -> Result<FixedPoint<i32, P>, ArithmeticError>
impl<P: Precision> CheckedMul<FixedPoint<i64, P>> for i64
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn cmul(
self,
rhs: FixedPoint<i64, P>
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i64, P>
) -> Result<FixedPoint<i64, P>, ArithmeticError>
impl<P: Precision> CheckedMul<i16> for FixedPoint<i16, P>
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn cmul(self, rhs: i16) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
impl<P: Precision> CheckedMul<i32> for FixedPoint<i32, P>
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn cmul(self, rhs: i32) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
impl<P: Precision> CheckedMul<i64> for FixedPoint<i64, P>
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn cmul(self, rhs: i64) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
impl<P: Precision> CheckedSub<FixedPoint<i16, P>> for FixedPoint<i16, P>
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn csub(
self,
rhs: FixedPoint<i16, P>
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i16, P>
) -> Result<FixedPoint<i16, P>, ArithmeticError>
impl<P: Precision> CheckedSub<FixedPoint<i32, P>> for FixedPoint<i32, P>
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn csub(
self,
rhs: FixedPoint<i32, P>
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i32, P>
) -> Result<FixedPoint<i32, P>, ArithmeticError>
impl<P: Precision> CheckedSub<FixedPoint<i64, P>> for FixedPoint<i64, P>
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn csub(
self,
rhs: FixedPoint<i64, P>
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i64, P>
) -> Result<FixedPoint<i64, P>, ArithmeticError>
impl<I: Clone, P: Clone> Clone for FixedPoint<I, P>
[src]
pub fn clone(&self) -> FixedPoint<I, P>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<I: Copy, P: Copy> Copy for FixedPoint<I, P>
[src]
impl<P: Precision> Debug for FixedPoint<i16, P>
[src]
impl<P: Precision> Debug for FixedPoint<i32, P>
[src]
impl<P: Precision> Debug for FixedPoint<i64, P>
[src]
impl<I: Default, P: Default> Default for FixedPoint<I, P>
[src]
pub fn default() -> FixedPoint<I, P>
[src]
impl<'de, I, P> Deserialize<'de> for FixedPoint<I, P> where
I: Deserialize<'de>,
[src]
I: Deserialize<'de>,
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<P: Precision> Display for FixedPoint<i16, P>
[src]
impl<P: Precision> Display for FixedPoint<i32, P>
[src]
impl<P: Precision> Display for FixedPoint<i64, P>
[src]
impl<I: Eq, P: Eq> Eq for FixedPoint<I, P>
[src]
impl<P: Precision> FromStr for FixedPoint<i16, P>
[src]
type Err = ConvertError
The associated error which can be returned from parsing.
pub fn from_str(str: &str) -> Result<Self, Self::Err>
[src]
impl<P: Precision> FromStr for FixedPoint<i32, P>
[src]
type Err = ConvertError
The associated error which can be returned from parsing.
pub fn from_str(str: &str) -> Result<Self, Self::Err>
[src]
impl<P: Precision> FromStr for FixedPoint<i64, P>
[src]
type Err = ConvertError
The associated error which can be returned from parsing.
pub fn from_str(str: &str) -> Result<Self, Self::Err>
[src]
impl<I: Hash, P: Hash> Hash for FixedPoint<I, P>
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<P: Precision> Numeric for FixedPoint<i16, P>
[src]
impl<P: Precision> Numeric for FixedPoint<i32, P>
[src]
impl<P: Precision> Numeric for FixedPoint<i64, P>
[src]
impl<I: Ord, P: Ord> Ord for FixedPoint<I, P>
[src]
pub fn cmp(&self, other: &FixedPoint<I, P>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<I: PartialEq, P: PartialEq> PartialEq<FixedPoint<I, P>> for FixedPoint<I, P>
[src]
pub fn eq(&self, other: &FixedPoint<I, P>) -> bool
[src]
pub fn ne(&self, other: &FixedPoint<I, P>) -> bool
[src]
impl<I: PartialOrd, P: PartialOrd> PartialOrd<FixedPoint<I, P>> for FixedPoint<I, P>
[src]
pub fn partial_cmp(&self, other: &FixedPoint<I, P>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &FixedPoint<I, P>) -> bool
[src]
pub fn le(&self, other: &FixedPoint<I, P>) -> bool
[src]
pub fn gt(&self, other: &FixedPoint<I, P>) -> bool
[src]
pub fn ge(&self, other: &FixedPoint<I, P>) -> bool
[src]
impl<P: Precision> RoundingDiv<FixedPoint<i16, P>> for FixedPoint<i16, P>
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn rdiv(self, rhs: Self, mode: RoundMode) -> Result<Self, ArithmeticError>
[src]
impl<P: Precision> RoundingDiv<FixedPoint<i16, P>> for i16
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn rdiv(
self,
rhs: FixedPoint<i16, P>,
mode: RoundMode
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i16, P>,
mode: RoundMode
) -> Result<FixedPoint<i16, P>, ArithmeticError>
impl<P: Precision> RoundingDiv<FixedPoint<i32, P>> for FixedPoint<i32, P>
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn rdiv(self, rhs: Self, mode: RoundMode) -> Result<Self, ArithmeticError>
[src]
impl<P: Precision> RoundingDiv<FixedPoint<i32, P>> for i32
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn rdiv(
self,
rhs: FixedPoint<i32, P>,
mode: RoundMode
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i32, P>,
mode: RoundMode
) -> Result<FixedPoint<i32, P>, ArithmeticError>
impl<P: Precision> RoundingDiv<FixedPoint<i64, P>> for FixedPoint<i64, P>
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn rdiv(self, rhs: Self, mode: RoundMode) -> Result<Self, ArithmeticError>
[src]
impl<P: Precision> RoundingDiv<FixedPoint<i64, P>> for i64
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn rdiv(
self,
rhs: FixedPoint<i64, P>,
mode: RoundMode
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
self,
rhs: FixedPoint<i64, P>,
mode: RoundMode
) -> Result<FixedPoint<i64, P>, ArithmeticError>
impl<P: Precision> RoundingDiv<i16> for FixedPoint<i16, P>
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn rdiv(
self,
rhs: i16,
mode: RoundMode
) -> Result<FixedPoint<i16, P>, ArithmeticError>
[src]
self,
rhs: i16,
mode: RoundMode
) -> Result<FixedPoint<i16, P>, ArithmeticError>
impl<P: Precision> RoundingDiv<i32> for FixedPoint<i32, P>
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn rdiv(
self,
rhs: i32,
mode: RoundMode
) -> Result<FixedPoint<i32, P>, ArithmeticError>
[src]
self,
rhs: i32,
mode: RoundMode
) -> Result<FixedPoint<i32, P>, ArithmeticError>
impl<P: Precision> RoundingDiv<i64> for FixedPoint<i64, P>
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn rdiv(
self,
rhs: i64,
mode: RoundMode
) -> Result<FixedPoint<i64, P>, ArithmeticError>
[src]
self,
rhs: i64,
mode: RoundMode
) -> Result<FixedPoint<i64, P>, ArithmeticError>
impl<P: Precision> RoundingMul<FixedPoint<i16, P>> for FixedPoint<i16, P>
[src]
type Output = FixedPoint<i16, P>
type Error = ArithmeticError
pub fn rmul(self, rhs: Self, mode: RoundMode) -> Result<Self, ArithmeticError>
[src]
impl<P: Precision> RoundingMul<FixedPoint<i32, P>> for FixedPoint<i32, P>
[src]
type Output = FixedPoint<i32, P>
type Error = ArithmeticError
pub fn rmul(self, rhs: Self, mode: RoundMode) -> Result<Self, ArithmeticError>
[src]
impl<P: Precision> RoundingMul<FixedPoint<i64, P>> for FixedPoint<i64, P>
[src]
type Output = FixedPoint<i64, P>
type Error = ArithmeticError
pub fn rmul(self, rhs: Self, mode: RoundMode) -> Result<Self, ArithmeticError>
[src]
impl<I, P> Serialize for FixedPoint<I, P> where
I: Serialize,
[src]
I: Serialize,
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<I, P> StructuralEq for FixedPoint<I, P>
[src]
impl<I, P> StructuralPartialEq for FixedPoint<I, P>
[src]
impl<P: Precision> TryFrom<i128> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i128) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i128> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i128) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i128> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i128) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i16> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i16) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i16> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i16) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i16> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i16) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i32> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i32) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i32> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i32) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i32> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i32) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i64> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i64) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i64> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i64) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i64> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i64) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i8> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i8) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i8> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i8) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<i8> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: i8) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<isize> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: isize) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<isize> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: isize) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<isize> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: isize) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u128> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u128) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u128> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u128) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u128> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u128) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u16> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u16) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u16> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u16) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u16> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u16) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u32> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u32) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u32> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u32) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u32> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u32) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u64> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u64) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u64> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u64) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u64> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u64) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u8> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u8) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u8> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u8) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<u8> for FixedPoint<i64, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: u8) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<usize> for FixedPoint<i16, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: usize) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<usize> for FixedPoint<i32, P>
[src]
type Error = ConvertError
The type returned in the event of a conversion error.
pub fn try_from(value: usize) -> Result<Self, Self::Error>
[src]
impl<P: Precision> TryFrom<usize> for FixedPoint<i64, P>
[src]
Auto Trait Implementations
impl<I, P> RefUnwindSafe for FixedPoint<I, P> where
I: RefUnwindSafe,
P: RefUnwindSafe,
[src]
I: RefUnwindSafe,
P: RefUnwindSafe,
impl<I, P> Send for FixedPoint<I, P> where
I: Send,
P: Send,
[src]
I: Send,
P: Send,
impl<I, P> Sync for FixedPoint<I, P> where
I: Sync,
P: Sync,
[src]
I: Sync,
P: Sync,
impl<I, P> Unpin for FixedPoint<I, P> where
I: Unpin,
P: Unpin,
[src]
I: Unpin,
P: Unpin,
impl<I, P> UnwindSafe for FixedPoint<I, P> where
I: UnwindSafe,
P: UnwindSafe,
[src]
I: UnwindSafe,
P: UnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,