[−][src]Trait fixed::traits::Fixed
This trait provides methods common to all fixed-point numbers.
It can be helpful when writing generic code that makes use of
fixed-point numbers. For methods only available on signed
fixed-point numbers, use the FixedSigned trait instead, and
for methods only available on unsigned fixed-point numbers, use
FixedUnsigned.
This trait is sealed and cannot be implemented for more types; it
is implemented for FixedI8, FixedI16, FixedI32,
FixedI64, FixedI128, FixedU8, FixedU16,
FixedU32, FixedU64, and FixedU128.
Examples
use fixed::{ traits::Fixed, types::{I8F8, I16F16}, }; fn checked_add_twice<F: Fixed>(lhs: F, rhs: F) -> Option<F> { lhs.checked_add(rhs)?.checked_add(rhs) } let val1 = checked_add_twice(I8F8::from_num(5), Fixed::from_num(1.75)); assert_eq!(val1, Some(Fixed::from_num(8.5))); // can use with different fixed-point type let val2 = checked_add_twice(I16F16::from_num(5), Fixed::from_num(1.75)); assert_eq!(val2, Some(Fixed::from_num(8.5)));
The following example fails to compile, since the compiler cannot
infer that 500 in the checked_mul_int call is of type F::Bits.
use fixed::traits::Fixed; fn checked_add_times_500<F: Fixed>(lhs: F, rhs: F) -> Option<F> { rhs.checked_mul_int(500)?.checked_add(lhs) }
One way to fix this is to add a trait bound indicating that any
u16 (which can represent 500) can be converted to F::Bits.
use fixed::{traits::Fixed, types::U12F4}; fn checked_add_times_500<F: Fixed>(lhs: F, rhs: F) -> Option<F> where F::Bits: From<u16>, { rhs.checked_mul_int(F::Bits::from(500))?.checked_add(lhs) } let val = checked_add_times_500(U12F4::from_num(0.25), Fixed::from_num(1.5)); assert_eq!(val, Some(Fixed::from_num(750.25)));
While this works in most cases, u16 cannot be converted to
i16, even if the value 500 does fit in i16, so that the
following example would fail to compile.
use fixed::{traits::Fixed, types::I12F4}; fn checked_add_times_500<F: Fixed>(lhs: F, rhs: F) -> Option<F> where F::Bits: From<u16>, { rhs.checked_mul_int(F::Bits::from(500))?.checked_add(lhs) } // I12F4::Bits is i16, which does not implement From<u16> let val = checked_add_times_500(I12F4::from_num(0.25), Fixed::from_num(1.5));
We can use TryFrom to fix this, as we know that
F::Bits::try_from(500_u16) will work for both u16 and
i16. (The function will always return None when F::Bits
is u8 or i8.)
use fixed::{traits::Fixed, types::I12F4}; use std::convert::TryFrom; fn checked_add_times_500<F: Fixed>(lhs: F, rhs: F) -> Option<F> where F::Bits: TryFrom<u16>, { let m = F::Bits::try_from(500).ok()?; rhs.checked_mul_int(m)?.checked_add(lhs) } let val = checked_add_times_500(I12F4::from_num(0.25), Fixed::from_num(1.5)); assert_eq!(val, Some(Fixed::from_num(750.25)));
Associated Types
type Bits
The primitive integer underlying type.
type Frac: Unsigned
The number of fractional bits.
<F as Fixed>::Frac::U32 is equivalent to
<F as Fixed>::frac_nbits().
Required methods
fn min_value() -> Self
Returns the smallest value that can be represented.
fn max_value() -> Self
Returns the largest value that can be represented.
fn int_nbits() -> u32
Returns the number of integer bits.
fn frac_nbits() -> u32
Returns the number of fractional bits.
fn from_bits(bits: Self::Bits) -> Self
Creates a fixed-point number that has a bitwise representation identical to the given integer.
fn to_bits(self) -> Self::Bits
Creates an integer that has a bitwise representation identical to the given fixed-point number.
fn from_num<Src: ToFixed>(src: Src) -> Self
Creates a fixed-point number from another number.
Returns the same value as src.to_fixed().
fn to_num<Dst: FromFixed>(self) -> Dst
Converts a fixed-point number to another number.
Returns the same value as Dst::from_fixed(self).
fn checked_from_num<Src: ToFixed>(src: Src) -> Option<Self>
Creates a fixed-point number from another number if it fits,
otherwise returns None.
Returns the same value as src.checked_to_fixed().
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>
Converts a fixed-point number to another number if it fits,
otherwise returns None.
Returns the same value as Dst::checked_from_fixed(self).
fn saturating_from_num<Src: ToFixed>(src: Src) -> Self
Creates a fixed-point number from another number, saturating the value if it does not fit.
Returns the same value as src.saturating_to_fixed().
fn saturating_to_num<Dst: FromFixed>(self) -> Dst
Converts a fixed-point number to another number, saturating the value if it does not fit.
Returns the same value as Dst::saturating_from_fixed(self).
fn wrapping_from_num<Src: ToFixed>(src: Src) -> Self
Creates a fixed-point number from another number, wrapping the value on overflow.
Returns the same value as src.wrapping_to_fixed().
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst
Converts a fixed-point number to another number, wrapping the value on overflow.
Returns the same value as Src::wrapping_from_fixed(self).
fn overflowing_from_num<Src: ToFixed>(src: Src) -> (Self, bool)
Creates a fixed-point number from another number.
Returns the same value as src.overflowing_to_fixed().
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)
Converts a fixed-point number to another number.
Returns the same value as Dst::overflowing_from_fixed(self).
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing binary digits to a fixed-point number.
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing octal digits to a fixed-point number.
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing hexadecimal digits to a fixed-point number.
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing decimal digits to a fixed-point number, saturating on overflow.
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing binary digits to a fixed-point number, saturating on overflow.
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing octal digits to a fixed-point number, saturating on overflow.
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing hexadecimal digits to a fixed-point number, saturating on overflow.
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing decimal digits to a fixed-point number, wrapping on overflow.
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing binary digits to a fixed-point number, wrapping on overflow.
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing octal digits to a fixed-point number, wrapping on overflow.
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>
Converts a string slice containing hexadecimal digits to a fixed-point number, wrapping on overflow.
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>
Converts a string slice containing decimal digits to a fixed-point number.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>
src: &str
) -> Result<(Self, bool), ParseFixedError>
Converts a string slice containing binary digits to a fixed-point number.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>
src: &str
) -> Result<(Self, bool), ParseFixedError>
Converts a string slice containing octal digits to a fixed-point number.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>
Converts a string slice containing hexadecimal digits to a fixed-point number.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn int(self) -> Self
Returns the integer part.
fn frac(self) -> Self
Returns the fractional part.
fn round_to_zero(self) -> Self
Rounds to the next integer towards 0.
fn ceil(self) -> Self
Rounds to the next integer towards +∞.
fn floor(self) -> Self
Rounds to the next integer towards −∞.
fn round(self) -> Self
Rounds to the nearest integer, with ties rounded away from zero.
fn round_ties_to_even(self) -> Self
Rounds to the nearest integer, with ties rounded to even.
fn checked_ceil(self) -> Option<Self>
Checked ceil. Rounds to the next integer towards +∞, returning
None on overflow.
fn checked_floor(self) -> Option<Self>
Checked floor. Rounds to the next integer towards −∞, returning
None on overflow.
fn checked_round(self) -> Option<Self>
Checked round. Rounds to the nearest integer, with ties
rounded away from zero, returning None on overflow.
fn checked_round_ties_to_even(self) -> Option<Self>
Checked round. Rounds to the nearest integer, with ties
rounded to even, returning None on overflow.
fn saturating_ceil(self) -> Self
Saturating ceil. Rounds to the next integer towards +∞, saturating on overflow.
fn saturating_floor(self) -> Self
Saturating floor. Rounds to the next integer towards −∞, saturating on overflow.
fn saturating_round(self) -> Self
Saturating round. Rounds to the nearest integer, with ties rounded away from zero, and saturating on overflow.
fn saturating_round_ties_to_even(self) -> Self
Saturating round. Rounds to the nearest integer, with ties rounded to_even, and saturating on overflow.
fn wrapping_ceil(self) -> Self
Wrapping ceil. Rounds to the next integer towards +∞, wrapping on overflow.
fn wrapping_floor(self) -> Self
Wrapping floor. Rounds to the next integer towards −∞, wrapping on overflow.
fn wrapping_round(self) -> Self
Wrapping round. Rounds to the next integer to the nearest, with ties rounded away from zero, and wrapping on overflow.
fn wrapping_round_ties_to_even(self) -> Self
Wrapping round. Rounds to the next integer to the nearest, with ties rounded to even, and wrapping on overflow.
fn overflowing_ceil(self) -> (Self, bool)
Overflowing ceil. Rounds to the next integer towards +∞.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_floor(self) -> (Self, bool)
Overflowing floor. Rounds to the next integer towards −∞.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_round(self) -> (Self, bool)
Overflowing round. Rounds to the next integer to the nearest, with ties rounded away from zero.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_round_ties_to_even(self) -> (Self, bool)
Overflowing round. Rounds to the next integer to the nearest, with ties rounded to even.
Returns a tuple of the fixed-point number and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn count_ones(self) -> u32
Returns the number of ones in the binary representation.
fn count_zeros(self) -> u32
Returns the number of zeros in the binary representation.
fn leading_zeros(self) -> u32
Returns the number of leading zeros in the binary representation.
fn trailing_zeros(self) -> u32
Returns the number of trailing zeros in the binary representation.
fn rotate_left(self, n: u32) -> Self
Shifts to the left by n bits, wrapping the truncated bits to the right end.
fn rotate_right(self, n: u32) -> Self
Shifts to the right by n bits, wrapping the truncated bits to the left end.
fn checked_neg(self) -> Option<Self>
Checked negation. Returns the negated value, or None on overflow.
fn checked_add(self, rhs: Self) -> Option<Self>
Checked addition. Returns the sum, or None on overflow.
fn checked_sub(self, rhs: Self) -> Option<Self>
Checked subtraction. Returns the difference, or None on overflow.
fn checked_mul(self, rhs: Self) -> Option<Self>
Checked multiplication. Returns the product, or None on overflow.
fn checked_div(self, rhs: Self) -> Option<Self>
Checked division. Returns the quotient, or None if the
divisor is zero or on overflow.
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>
Checked multiplication by an integer. Returns the product, or
None on overflow.
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>
Checked division by an integer. Returns the quotient, or
None if the divisor is zero or if the division results in
overflow.
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>
Checked fixed-point remainder for division by an integer.
Returns the remainder, or None if the divisor is zero or
if the division results in overflow.
fn checked_shl(self, rhs: u32) -> Option<Self>
Checked shift left. Returns the shifted number, or None if
rhs ≥ the number of bits.
fn checked_shr(self, rhs: u32) -> Option<Self>
Checked shift right. Returns the shifted number, or None
if rhs ≥ the number of bits.
fn saturating_neg(self) -> Self
Saturated negation. Returns the negated value, saturating on overflow.
fn saturating_add(self, rhs: Self) -> Self
Saturating addition. Returns the sum, saturating on overflow.
fn saturating_sub(self, rhs: Self) -> Self
Saturating subtraction. Returns the difference, saturating on overflow.
fn saturating_mul(self, rhs: Self) -> Self
Saturating multiplication. Returns the product, saturating on overflow.
fn saturating_div(self, rhs: Self) -> Self
Saturating division. Returns the quotient, saturating on overflow.
Panics
Panics if the divisor is zero.
fn saturating_mul_int(self, rhs: Self::Bits) -> Self
Saturating multiplication by an integer. Returns the product, saturating on overflow.
fn wrapping_neg(self) -> Self
Wrapping negation. Returns the negated value, wrapping on overflow.
fn wrapping_add(self, rhs: Self) -> Self
Wrapping addition. Returns the sum, wrapping on overflow.
fn wrapping_sub(self, rhs: Self) -> Self
Wrapping subtraction. Returns the difference, wrapping on overflow.
fn wrapping_mul(self, rhs: Self) -> Self
Wrapping multiplication. Returns the product, wrapping on overflow.
fn wrapping_div(self, rhs: Self) -> Self
Wrapping division. Returns the quotient, wrapping on overflow.
Panics
Panics if the divisor is zero.
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self
Wrapping multiplication by an integer. Returns the product, wrapping on overflow.
fn wrapping_div_int(self, rhs: Self::Bits) -> Self
Wrapping division by an integer. Returns the quotient, wrapping on overflow.
Overflow can only occur when dividing the minimum value by −1.
Panics
Panics if the divisor is zero.
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self
Wrapping fixed-point remainder for division by an integer. Returns the remainder, wrapping on overflow.
Overflow can only occur when dividing the minimum value by −1.
Panics
Panics if the divisor is zero.
fn wrapping_shl(self, rhs: u32) -> Self
Wrapping shift left. Wraps rhs if rhs ≥ the number of
bits, then shifts and returns the number.
fn wrapping_shr(self, rhs: u32) -> Self
Wrapping shift right. Wraps rhs if rhs ≥ the number of
bits, then shifts and returns the number.
fn overflowing_neg(self) -> (Self, bool)
Overflowing negation.
Returns a tuple of the negated value and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_add(self, rhs: Self) -> (Self, bool)
Overflowing addition.
Returns a tuple of the sum and a bool, indicating whether
an overflow has occurred. On overflow, the wrapped value is
returned.
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
Overflowing subtraction.
Returns a tuple of the difference and a bool, indicating
whether an overflow has occurred. On overflow, the wrapped
value is returned.
fn overflowing_mul(self, rhs: Self) -> (Self, bool)
Overflowing multiplication.
Returns a tuple of the product and a bool, indicating
whether an overflow has occurred. On overflow, the wrapped
value is returned.
fn overflowing_div(self, rhs: Self) -> (Self, bool)
Overflowing division.
Returns a tuple of the quotient and a bool, indicating
whether an overflow has occurred. On overflow, the wrapped
value is returned.
Panics
Panics if the divisor is zero.
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)
Overflowing multiplication by an integer.
Returns a tuple of the product and a bool, indicating
whether an overflow has occurred. On overflow, the wrapped
value is returned.
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)
Overflowing division by an integer.
Returns a tuple of the quotient and a bool, indicating
whether an overflow has occurred. On overflow, the wrapped
value is returned.
Panics
Panics if the divisor is zero.
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)
Overflowing fixed-point remainder for division by an integer.
Returns a tuple of the remainder and a bool, indicating
whether an overflow has occurred. On overflow, the wrapped
value is returned. Overflow can only occur when dividing the
minimum value by −1.
Panics
Panics if the divisor is zero.
fn overflowing_shl(self, rhs: u32) -> (Self, bool)
Overflowing shift left.
Returns a tuple of the shifted value and a bool,
indicating whether an overflow has occurred. On overflow, the
wrapped value is returned.
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
Provided methods
fn mul_int(self, rhs: Self::Bits) -> Self
use lhs * rhs instead of lhs.mul_int(rhs)
Multiplication by an integer.
fn div_int(self, rhs: Self::Bits) -> Self
use lhs / rhs instead of lhs.div_int(rhs)
Division by an integer.
fn rem_int(self, rhs: Self::Bits) -> Self
use lhs % rhs instead of lhs.rem_int(rhs)
Remainder for division by an integer.
fn from_int<Src: ToFixed>(src: Src) -> Self
replaced by from_num
Creates a fixed-point number from another number.
fn to_int<Dst: FromFixed>(self) -> Dst
replaced by to_num
Converts a fixed-point number to another number.
fn from_float<Src: ToFixed>(src: Src) -> Self
replaced by from_num
Creates a fixed-point number from another number.
fn to_float<Dst: FromFixed>(self) -> Dst
replaced by to_num
Converts a fixed-point number to another number.
fn checked_from_int<Src: ToFixed>(src: Src) -> Option<Self>
replaced by checked_from_num
Creates a fixed-point number from another number.
fn checked_to_int<Dst: FromFixed>(self) -> Option<Dst>
replaced by checked_to_num
Converts a fixed-point number to another number.
fn checked_from_float<Src: ToFixed>(src: Src) -> Option<Self>
replaced by checked_from_num
Creates a fixed-point number from another number.
fn saturating_from_int<Src: ToFixed>(src: Src) -> Self
replaced by saturating_from_num
Creates a fixed-point number from another number.
fn saturating_to_int<Dst: FromFixed>(self) -> Dst
replaced by saturating_to_num
Converts a fixed-point number to another number.
fn saturating_from_float<Src: ToFixed>(src: Src) -> Self
replaced by saturating_from_num
Creates a fixed-point number from another number.
fn wrapping_from_int<Src: ToFixed>(src: Src) -> Self
replaced by wrapping_from_num
Creates a fixed-point number from another number.
fn wrapping_to_int<Dst: FromFixed>(self) -> Dst
replaced by wrapping_to_num
Converts a fixed-point number to another number.
fn wrapping_from_float<Src: ToFixed>(src: Src) -> Self
replaced by wrapping_from_num
Creates a fixed-point number from another number.
fn overflowing_from_int<Src: ToFixed>(src: Src) -> (Self, bool)
replaced by overflowing_from_num
Creates a fixed-point number from another number.
fn overflowing_to_int<Dst: FromFixed>(self) -> (Dst, bool)
replaced by overflowing_to_num
Converts a fixed-point number to another number.
fn overflowing_from_float<Src: ToFixed>(src: Src) -> (Self, bool)
replaced by overflowing_from_num
Creates a fixed-point number from another number.
Implementors
impl<Frac: LeEqU128> Fixed for FixedI128<Frac>[src]
type Bits = i128
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU128> Fixed for FixedU128<Frac>[src]
type Bits = u128
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU16> Fixed for FixedI16<Frac>[src]
type Bits = i16
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU16> Fixed for FixedU16<Frac>[src]
type Bits = u16
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU32> Fixed for FixedI32<Frac>[src]
type Bits = i32
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU32> Fixed for FixedU32<Frac>[src]
type Bits = u32
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU64> Fixed for FixedI64<Frac>[src]
type Bits = i64
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU64> Fixed for FixedU64<Frac>[src]
type Bits = u64
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU8> Fixed for FixedI8<Frac>[src]
type Bits = i8
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_hex(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn int(self) -> Self[src]
fn frac(self) -> Self[src]
fn ceil(self) -> Self[src]
fn floor(self) -> Self[src]
fn round_to_zero(self) -> Self[src]
fn round(self) -> Self[src]
fn round_ties_to_even(self) -> Self[src]
fn checked_ceil(self) -> Option<Self>[src]
fn checked_floor(self) -> Option<Self>[src]
fn checked_round(self) -> Option<Self>[src]
fn checked_round_ties_to_even(self) -> Option<Self>[src]
fn saturating_ceil(self) -> Self[src]
fn saturating_floor(self) -> Self[src]
fn saturating_round(self) -> Self[src]
fn saturating_round_ties_to_even(self) -> Self[src]
fn wrapping_ceil(self) -> Self[src]
fn wrapping_floor(self) -> Self[src]
fn wrapping_round(self) -> Self[src]
fn wrapping_round_ties_to_even(self) -> Self[src]
fn overflowing_ceil(self) -> (Self, bool)[src]
fn overflowing_floor(self) -> (Self, bool)[src]
fn overflowing_round(self) -> (Self, bool)[src]
fn overflowing_round_ties_to_even(self) -> (Self, bool)[src]
fn count_ones(self) -> u32[src]
fn count_zeros(self) -> u32[src]
fn leading_zeros(self) -> u32[src]
fn trailing_zeros(self) -> u32[src]
fn rotate_left(self, n: u32) -> Self[src]
fn rotate_right(self, n: u32) -> Self[src]
fn checked_neg(self) -> Option<Self>[src]
fn checked_add(self, rhs: Self) -> Option<Self>[src]
fn checked_sub(self, rhs: Self) -> Option<Self>[src]
fn checked_mul(self, rhs: Self) -> Option<Self>[src]
fn checked_div(self, rhs: Self) -> Option<Self>[src]
fn checked_mul_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_div_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_rem_int(self, rhs: Self::Bits) -> Option<Self>[src]
fn checked_shl(self, rhs: u32) -> Option<Self>[src]
fn checked_shr(self, rhs: u32) -> Option<Self>[src]
fn saturating_neg(self) -> Self[src]
fn saturating_add(self, rhs: Self) -> Self[src]
fn saturating_sub(self, rhs: Self) -> Self[src]
fn saturating_mul(self, rhs: Self) -> Self[src]
fn saturating_div(self, rhs: Self) -> Self[src]
fn saturating_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_neg(self) -> Self[src]
fn wrapping_add(self, rhs: Self) -> Self[src]
fn wrapping_sub(self, rhs: Self) -> Self[src]
fn wrapping_mul(self, rhs: Self) -> Self[src]
fn wrapping_div(self, rhs: Self) -> Self[src]
fn wrapping_mul_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_div_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_rem_int(self, rhs: Self::Bits) -> Self[src]
fn wrapping_shl(self, rhs: u32) -> Self[src]
fn wrapping_shr(self, rhs: u32) -> Self[src]
fn overflowing_neg(self) -> (Self, bool)[src]
fn overflowing_add(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_sub(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_div(self, rhs: Self) -> (Self, bool)[src]
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool)[src]
fn overflowing_shl(self, rhs: u32) -> (Self, bool)[src]
fn overflowing_shr(self, rhs: u32) -> (Self, bool)[src]
impl<Frac: LeEqU8> Fixed for FixedU8<Frac>[src]
type Bits = u8
type Frac = Frac
fn min_value() -> Self[src]
fn max_value() -> Self[src]
fn int_nbits() -> u32[src]
fn frac_nbits() -> u32[src]
fn from_bits(bits: Self::Bits) -> Self[src]
fn to_bits(self) -> Self::Bits[src]
fn from_num<Src: ToFixed>(src: Src) -> Self[src]
fn to_num<Dst: FromFixed>(self) -> Dst[src]
fn checked_from_num<Src: ToFixed>(val: Src) -> Option<Self>[src]
fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]
fn saturating_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]
fn wrapping_from_num<Src: ToFixed>(val: Src) -> Self[src]
fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]
fn overflowing_from_num<Src: ToFixed>(val: Src) -> (Self, bool)[src]
fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]
fn from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn saturating_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_binary(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_octal(src: &str) -> Result<Self, ParseFixedError>[src]
fn wrapping_from_str_hex(src: &str) -> Result<Self, ParseFixedError>[src]
fn overflowing_from_str(src: &str) -> Result<(Self, bool), ParseFixedError>[src]
fn overflowing_from_str_binary(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>
fn overflowing_from_str_octal(
src: &str
) -> Result<(Self, bool), ParseFixedError>[src]
src: &str
) -> Result<(Self, bool), ParseFixedError>