[][src]Struct fixed::FixedU128

#[repr(transparent)]
pub struct FixedU128<Frac> { /* fields omitted */ }

A 128-bit fixed-point unsigned number with Frac fractional bits.

Currently Frac is an Unsigned as provided by the typenum crate; it is planned to move to const generics when they are implemented by the Rust compiler.

Examples

use fixed::{types::extra::U3, FixedU128};
let eleven = FixedU128::<U3>::from_num(11);
assert_eq!(eleven, FixedU128::<U3>::from_bits(11 << 3));
assert_eq!(eleven, 11);
assert_eq!(eleven.to_string(), "11");
let two_point_75 = eleven / 4;
assert_eq!(two_point_75, FixedU128::<U3>::from_bits(11 << 1));
assert_eq!(two_point_75, 2.75);
assert_eq!(two_point_75.to_string(), "2.8");

Methods

impl<Frac> FixedU128<Frac>[src]

pub const fn min_value() -> FixedU128<Frac>[src]

Returns the smallest value that can be represented.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::min_value(), Fix::from_bits(u128::min_value()));

pub const fn max_value() -> FixedU128<Frac>[src]

Returns the largest value that can be represented.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::max_value(), Fix::from_bits(u128::max_value()));

pub const fn from_bits(bits: u128) -> FixedU128<Frac>[src]

Creates a fixed-point number that has a bitwise representation identical to the given integer.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 0010.0000 == 2
assert_eq!(Fix::from_bits(0b10_0000), 2);

pub const fn to_bits(self) -> u128[src]

Creates an integer that has a bitwise representation identical to the given fixed-point number.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 2 is 0010.0000
assert_eq!(Fix::from_num(2).to_bits(), 0b10_0000);

pub const fn count_ones(self) -> u32[src]

Returns the number of ones in the binary representation.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let f = Fix::from_bits(0b11_0010);
assert_eq!(f.count_ones(), 3);

pub const fn count_zeros(self) -> u32[src]

Returns the number of zeros in the binary representation.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let f = Fix::from_bits(!0b11_0010);
assert_eq!(f.count_zeros(), 3);

pub const fn leading_zeros(self) -> u32[src]

Returns the number of leading zeros in the binary representation.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let f = Fix::from_bits(0b10_0000);
assert_eq!(f.leading_zeros(), 128 - 6);

pub const fn trailing_zeros(self) -> u32[src]

Returns the number of trailing zeros in the binary representation.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let f = Fix::from_bits(0b10_0000);
assert_eq!(f.trailing_zeros(), 5);

pub const fn rotate_left(self, n: u32) -> FixedU128<Frac>[src]

Shifts to the left by n bits, wrapping the truncated bits to the right end.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let bits: u128 = (0b111 << (128 - 3)) | 0b1010;
let rot = 0b1010111;
assert_eq!(bits.rotate_left(3), rot);
assert_eq!(Fix::from_bits(bits).rotate_left(3), Fix::from_bits(rot));

pub const fn rotate_right(self, n: u32) -> FixedU128<Frac>[src]

Shifts to the right by n bits, wrapping the truncated bits to the left end.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let bits: u128 = 0b1010111;
let rot = (0b111 << (128 - 3)) | 0b1010;
assert_eq!(bits.rotate_right(3), rot);
assert_eq!(Fix::from_bits(bits).rotate_right(3), Fix::from_bits(rot));

pub fn checked_neg(self) -> Option<FixedU128<Frac>>[src]

Checked negation. Returns the negated value, or None on overflow.

Only zero can be negated without overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(0).checked_neg(), Some(Fix::from_num(0)));
assert_eq!(Fix::from_num(5).checked_neg(), None);

pub fn checked_add(self, rhs: FixedU128<Frac>) -> Option<FixedU128<Frac>>[src]

Checked addition. Returns the sum, or None on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one = Fix::from_num(1);
assert_eq!((Fix::max_value() - one).checked_add(one), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_add(one), None);

pub fn checked_sub(self, rhs: FixedU128<Frac>) -> Option<FixedU128<Frac>>[src]

Checked subtraction. Returns the difference, or None on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one = Fix::from_num(1);
assert_eq!((Fix::min_value() + one).checked_sub(one), Some(Fix::min_value()));
assert_eq!(Fix::min_value().checked_sub(one), None);

pub fn checked_mul_int(self, rhs: u128) -> Option<FixedU128<Frac>>[src]

Checked multiplication by an integer. Returns the product, or None on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::max_value().checked_mul_int(1), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_mul_int(2), None);

pub fn checked_div_int(self, rhs: u128) -> Option<FixedU128<Frac>>[src]

Checked division by an integer. Returns the quotient, or None if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::max_value().checked_div_int(1), Some(Fix::max_value()));
assert_eq!(Fix::from_num(1).checked_div_int(0), None);

pub fn checked_rem_int(self, rhs: u128) -> Option<FixedU128<Frac>>[src]

Checked fixed-point remainder for division by an integer. Returns the remainder, or None if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// binary 1.0101 / 8 = binary 0.0010 remainder 0.0101
assert_eq!(Fix::from_bits(0b10101).checked_rem_int(8), Some(Fix::from_bits(0b101)));
assert_eq!(Fix::from_num(1).checked_rem_int(0), None);

pub fn checked_shl(self, rhs: u32) -> Option<FixedU128<Frac>>[src]

Checked shift left. Returns the shifted number, or None if rhs ≥ 128.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!((Fix::from_num(1) / 2).checked_shl(3), Some(Fix::from_num(4)));
assert_eq!((Fix::from_num(1) / 2).checked_shl(128), None);

pub fn checked_shr(self, rhs: u32) -> Option<FixedU128<Frac>>[src]

Checked shift right. Returns the shifted number, or None if rhs ≥ 128.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(4).checked_shr(3), Some(Fix::from_num(1) / 2));
assert_eq!(Fix::from_num(4).checked_shr(128), None);

pub fn saturating_neg(self) -> FixedU128<Frac>[src]

Saturating negation. Returns the negated value, saturating on overflow.

This method always returns zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(0).saturating_neg(), Fix::from_num(0));
assert_eq!(Fix::from_num(5).saturating_neg(), Fix::from_num(0));

pub fn saturating_add(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Saturating addition. Returns the sum, saturating on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).saturating_add(Fix::from_num(2)), Fix::from_num(5));
assert_eq!(Fix::max_value().saturating_add(Fix::from_num(1)), Fix::max_value());

pub fn saturating_sub(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Saturating subtraction. Returns the difference, saturating on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(5).saturating_sub(Fix::from_num(3)), Fix::from_num(2));
assert_eq!(Fix::from_num(0).saturating_sub(Fix::from_num(1)), Fix::from_num(0));

pub fn saturating_mul_int(self, rhs: u128) -> FixedU128<Frac>[src]

Saturating multiplication by an integer. Returns the product, saturating on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).saturating_mul_int(2), Fix::from_num(6));
assert_eq!(Fix::max_value().saturating_mul_int(2), Fix::max_value());

pub const fn wrapping_neg(self) -> FixedU128<Frac>[src]

Wrapping negation. Returns the negated value, wrapping on overflow.

Only zero can be negated without overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(0).wrapping_neg(), Fix::from_num(0));
assert_eq!(Fix::from_num(5).wrapping_neg(), Fix::wrapping_from_num(-5));
let neg_five_bits = !Fix::from_num(5).to_bits() + 1;
assert_eq!(Fix::from_num(5).wrapping_neg(), Fix::from_bits(neg_five_bits));

pub const fn wrapping_add(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Wrapping addition. Returns the sum, wrapping on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one = Fix::from_num(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_num(3).wrapping_add(Fix::from_num(2)), Fix::from_num(5));
assert_eq!(Fix::max_value().wrapping_add(one), one_minus_bit);

pub const fn wrapping_sub(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Wrapping subtraction. Returns the difference, wrapping on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one = Fix::from_num(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_num(5).wrapping_sub(Fix::from_num(3)), Fix::from_num(2));
assert_eq!(Fix::from_num(0).wrapping_sub(one), Fix::max_value() - one_minus_bit);

pub const fn wrapping_mul_int(self, rhs: u128) -> FixedU128<Frac>[src]

Wrapping multiplication by an integer. Returns the product, wrapping on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).wrapping_mul_int(2), Fix::from_num(6));
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().wrapping_mul_int(4), wrapped);

pub fn wrapping_div_int(self, rhs: u128) -> FixedU128<Frac>[src]

Wrapping division by an integer. Returns the quotient.

Can never overflow for unsigned values.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 1.5 is binary 1.1
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_num(3).wrapping_div_int(2), one_point_5);

pub fn wrapping_rem_int(self, rhs: u128) -> FixedU128<Frac>[src]

Wrapping fixed-point remainder for division by an integer. Returns the remainder.

Can never overflow for unsigned values.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// binary 1.0101 / 8 = binary 0.0010 remainder 0.0101
assert_eq!(Fix::from_bits(0b10101).wrapping_rem_int(8), Fix::from_bits(0b101));

pub const fn wrapping_shl(self, rhs: u32) -> FixedU128<Frac>[src]

Wrapping shift left. Wraps rhs if rhs ≥ 128, then shifts and returns the number.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!((Fix::from_num(1) / 2).wrapping_shl(3), Fix::from_num(4));
assert_eq!((Fix::from_num(1) / 2).wrapping_shl(3 + 128), Fix::from_num(4));

pub const fn wrapping_shr(self, rhs: u32) -> FixedU128<Frac>[src]

Wrapping shift right. Wraps rhs if rhs ≥ 128, then shifts and returns the number.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!((Fix::from_num(4)).wrapping_shr(3), Fix::from_num(1) / 2);
assert_eq!((Fix::from_num(4)).wrapping_shr(3 + 128), Fix::from_num(1) / 2);

pub const fn overflowing_neg(self) -> (FixedU128<Frac>, bool)[src]

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.

Only zero can be negated without overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(0).overflowing_neg(), (Fix::from_num(0), false));
assert_eq!(Fix::from_num(5).overflowing_neg(), Fix::overflowing_from_num(-5));
let neg_five_bits = !Fix::from_num(5).to_bits() + 1;
assert_eq!(Fix::from_num(5).overflowing_neg(), (Fix::from_bits(neg_five_bits), true));

pub const fn overflowing_add(
    self,
    rhs: FixedU128<Frac>
) -> (FixedU128<Frac>, bool)
[src]

Overflowing addition.

Returns a tuple of the sum and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one = Fix::from_num(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_num(3).overflowing_add(Fix::from_num(2)), (Fix::from_num(5), false));
assert_eq!(Fix::max_value().overflowing_add(one), (one_minus_bit, true));

pub const fn overflowing_sub(
    self,
    rhs: FixedU128<Frac>
) -> (FixedU128<Frac>, bool)
[src]

Overflowing subtraction.

Returns a tuple of the difference and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one = Fix::from_num(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_num(5).overflowing_sub(Fix::from_num(3)), (Fix::from_num(2), false));
assert_eq!(Fix::from_num(0).overflowing_sub(one), (Fix::max_value() - one_minus_bit, true));

pub const fn overflowing_mul_int(self, rhs: u128) -> (FixedU128<Frac>, bool)[src]

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.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).overflowing_mul_int(2), (Fix::from_num(6), false));
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().overflowing_mul_int(4), (wrapped, true));

pub fn overflowing_div_int(self, rhs: u128) -> (FixedU128<Frac>, bool)[src]

Overflowing division by an integer.

Returns a tuple of the quotient and false, as the division can never overflow for unsigned values.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 1.5 is binary 1.1
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_num(3).overflowing_div_int(2), (one_point_5, false));

pub fn overflowing_rem_int(self, rhs: u128) -> (FixedU128<Frac>, bool)[src]

Overflowing fixed-point remainder for division by an integer.

Returns a tuple of the remainder and false, as the division can never overflow for unsigned values.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// binary 1.0101 / 8 = binary 0.0010 remainder 0.0101
assert_eq!(Fix::from_bits(0b10101).overflowing_rem_int(8), (Fix::from_bits(0b101), false));

pub const fn overflowing_shl(self, rhs: u32) -> (FixedU128<Frac>, bool)[src]

Overflowing shift left.

Returns a tuple of the shifted value and a bool indicating whether an overflow has occurred. Overflow occurs when rhs ≥ 128. On overflow rhs is wrapped before the shift operation.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!((Fix::from_num(1) / 2).overflowing_shl(3), (Fix::from_num(4), false));
assert_eq!((Fix::from_num(1) / 2).overflowing_shl(3 + 128), (Fix::from_num(4), true));

pub const fn overflowing_shr(self, rhs: u32) -> (FixedU128<Frac>, bool)[src]

Overflowing shift right.

Returns a tuple of the shifted value and a bool indicating whether an overflow has occurred. Overflow occurs when rhs ≥ 128. On overflow rhs is wrapped before the shift operation.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!((Fix::from_num(4)).overflowing_shr(3), (Fix::from_num(1) / 2, false));
assert_eq!((Fix::from_num(4)).overflowing_shr(3 + 128), (Fix::from_num(1) / 2, true));

pub fn is_power_of_two(self) -> bool[src]

Returns true if the fixed-point number is 2k for some integer k.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 3/8 is 0.0110
let three_eights = Fix::from_bits(0b0110);
// 1/2 is 0.1000
let half = Fix::from_bits(0b1000);
assert!(!three_eights.is_power_of_two());
assert!(half.is_power_of_two());

pub fn next_power_of_two(self) -> FixedU128<Frac>[src]

Returns the smallest power of two ≥ self.

Panics

When debug assertions are enabled, panics if the next power of two is too large to represent. When debug assertions are not enabled, zero can be returned, but it is not considered a breaking change if in the future it panics.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 3/8 is 0.0110
let three_eights = Fix::from_bits(0b0110);
// 1/2 is 0.1000
let half = Fix::from_bits(0b1000);
assert_eq!(three_eights.next_power_of_two(), half);
assert_eq!(half.next_power_of_two(), half);

pub fn checked_next_power_of_two(self) -> Option<FixedU128<Frac>>[src]

Returns the smallest power of two ≥ self, or None if the next power of two is too large to represent.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 3/8 is 0.0110
let three_eights = Fix::from_bits(0b0110);
// 1/2 is 0.1000
let half = Fix::from_bits(0b1000);
assert_eq!(three_eights.checked_next_power_of_two(), Some(half));
assert!(Fix::max_value().checked_next_power_of_two().is_none());

impl<Frac: LeEqU128> FixedU128<Frac>[src]

pub const INT_NBITS: u32[src]

The number of integer bits.

Examples

use fixed::{types::extra::U6, FixedU128};
type Fix = FixedU128<U6>;
assert_eq!(Fix::INT_NBITS, 128 - 6);

pub const FRAC_NBITS: u32[src]

The number of fractional bits.

Examples

use fixed::{types::extra::U6, FixedU128};
type Fix = FixedU128<U6>;
assert_eq!(Fix::FRAC_NBITS, 6);

pub fn int_nbits() -> u32[src]

Returns the number of integer bits.

Examples

use fixed::{types::extra::U6, FixedU128};
type Fix = FixedU128<U6>;
assert_eq!(Fix::int_nbits(), 128 - 6);

pub fn frac_nbits() -> u32[src]

Returns the number of fractional bits.

Examples

use fixed::{types::extra::U6, FixedU128};
type Fix = FixedU128<U6>;
assert_eq!(Fix::frac_nbits(), 6);

pub fn from_num<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Creates a fixed-point number from another number.

The other number can be:

  • Another fixed-point number. Any extra fractional bits are truncated.
  • An integer of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, or usize.
  • A floating-point number of type f32 or f64. If the f16 feature is enabled, it can also be of type f16. For this conversion, the method rounds to the nearest, with ties rounding to even.
  • Any other number src for which ToFixed is implemented, in which case this method returns src.to_fixed().

Panics

For floating-point numbers, panics if the value is not finite.

When debug assertions are enabled, panics if the value does not fit. When debug assertions are not enabled, the wrapped value can be returned, but it is not considered a breaking change if in the future it panics; if wrapping is required use wrapping_from_num instead.

Examples

use fixed::{types::extra::U4, types::I16F16, FixedU128};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(Fix::from_num(src), Fix::from_bits(0b111 << (4 - 2)));

assert_eq!(Fix::from_num(3i32), Fix::from_bits(3 << 4));
assert_eq!(Fix::from_num(3i64), Fix::from_bits(3 << 4));

assert_eq!(Fix::from_num(1.75f32), Fix::from_bits(0b111 << (4 - 2)));
assert_eq!(Fix::from_num(1.75f64), Fix::from_bits(0b111 << (4-2)));

pub fn to_num<Dst: FromFixed>(self) -> Dst[src]

Converts a fixed-point number to another number.

The other number can be:

  • Another fixed-point number. Any extra fractional bits are truncated.
  • An integer of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, or usize. Any fractional bits are truncated.
  • A floating-point number of type f32 or f64. If the f16 feature is enabled, it can also be of type f16. For this conversion, the method rounds to the nearest, with ties rounding to even.
  • Any other type Dst for which FromFixed is implemented, in which case this method returns Dst::from_fixed(self).

Panics

When debug assertions are enabled, panics if the value does not fit. When debug assertions are not enabled, the wrapped value can be returned, but it is not considered a breaking change if in the future it panics; if wrapping is required use wrapping_to_num instead.

Examples

use fixed::{types::extra::U4, types::I30F2, FixedU128};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(src.to_num::<I30F2>(), I30F2::from_bits(0b111));
// src >> 2 is 0.0111, which for I30F2 is truncated to 0.01
assert_eq!((src >> 2u32).to_num::<I30F2>(), I30F2::from_bits(1));

// 2.5 is 10.1 in binary
let two_point_5 = Fix::from_bits(0b101 << (4 - 1));
assert_eq!(two_point_5.to_num::<i32>(), 2);
assert_eq!(two_point_5.to_num::<i64>(), 2);

// 1.625 is 1.101 in binary
let one_point_625 = Fix::from_bits(0b1101 << (4 - 3));
assert_eq!(one_point_625.to_num::<f32>(), 1.625f32);
assert_eq!(one_point_625.to_num::<f64>(), 1.625f64);

pub fn checked_from_num<Src: ToFixed>(src: Src) -> Option<FixedU128<Frac>>[src]

Creates a fixed-point number from another number if it fits, otherwise returns None.

The other number can be:

  • Another fixed-point number. Any extra fractional bits are truncated.
  • An integer of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, or usize.
  • A floating-point number of type f32 or f64. If the f16 feature is enabled, it can also be of type f16. For this conversion, the method rounds to the nearest, with ties rounding to even.
  • Any other number src for which ToFixed is implemented, in which case this method returns src.checked_to_fixed().

Examples

use fixed::{
    types::extra::{U2, U4},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(Fix::checked_from_num(src), Some(Fix::from_bits(0b111 << (4 - 2))));
let too_large = FixedU128::<U2>::max_value();
assert!(Fix::checked_from_num(too_large).is_none());

assert_eq!(Fix::checked_from_num(3), Some(Fix::from_bits(3 << 4)));
let too_large = u128::max_value();
assert!(Fix::checked_from_num(too_large).is_none());
let too_small = -1;
assert!(Fix::checked_from_num(too_small).is_none());

// 1.75 is 1.11 in binary
let expected = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::checked_from_num(1.75f32), Some(expected));
assert_eq!(Fix::checked_from_num(1.75f64), Some(expected));
assert!(Fix::checked_from_num(2e38).is_none());
assert!(Fix::checked_from_num(std::f64::NAN).is_none());

pub fn checked_to_num<Dst: FromFixed>(self) -> Option<Dst>[src]

Converts a fixed-point number to another number if it fits, otherwise returns None.

The other number can be:

  • Another fixed-point number. Any extra fractional bits are truncated.
  • An integer of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, or usize. Any fractional bits are truncated.
  • A floating-point number of type f32 or f64. If the f16 feature is enabled, it can also be of type f16. For this conversion, the method rounds to the nearest, with ties rounding to even.
  • Any other type Dst for which FromFixed is implemented, in which case this method returns Dst::checked_from_fixed(self).

Examples

use fixed::{
    types::extra::{U0, U4, U6},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = Fix::from_bits(0b111 << (4 - 2));
let expected = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(src.checked_to_num::<I16F16>(), Some(expected));
type TooFewIntBits = FixedU128<U6>;
assert!(Fix::max_value().checked_to_num::<TooFewIntBits>().is_none());

// 2.5 is 10.1 in binary
let two_point_5 = Fix::from_bits(0b101 << (4 - 1));
assert_eq!(two_point_5.checked_to_num::<i32>(), Some(2));
assert_eq!(two_point_5.checked_to_num::<i64>(), Some(2));
type AllInt = FixedU128<U0>;
assert!(AllInt::max_value().checked_to_num::<i128>().is_none());

// 1.625 is 1.101 in binary
let one_point_625 = Fix::from_bits(0b1101 << (4 - 3));
assert_eq!(one_point_625.checked_to_num::<f32>(), Some(1.625f32));

pub fn saturating_from_num<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Creates a fixed-point number from another number, saturating if it does not fit.

The other number can be:

Panics

This method panics if the value is a floating-point NaN.

Examples

use fixed::{
    types::extra::{U2, U4},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(Fix::saturating_from_num(src), Fix::from_bits(0b111 << (4 - 2)));
let too_large = FixedU128::<U2>::max_value();
assert_eq!(Fix::saturating_from_num(too_large), Fix::max_value());

assert_eq!(Fix::saturating_from_num(3), Fix::from_bits(3 << 4));
let too_small = -1;
assert_eq!(Fix::saturating_from_num(too_small), Fix::min_value());

// 1.75 is 1.11 in binary
let expected = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::saturating_from_num(1.75f32), expected);
assert_eq!(Fix::saturating_from_num(1.75f64), expected);
assert_eq!(Fix::saturating_from_num(2e38), Fix::max_value());
assert_eq!(Fix::saturating_from_num(std::f64::NEG_INFINITY), Fix::min_value());

pub fn saturating_to_num<Dst: FromFixed>(self) -> Dst[src]

Converts a fixed-point number to another number, saturating the value if it does not fit.

The other number can be:

Examples

use fixed::{
    types::extra::{U0, U4, U6},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = Fix::from_bits(0b111 << (4 - 2));
let expected = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(src.saturating_to_num::<I16F16>(), expected);
type TooFewIntBits = FixedU128<U6>;
let saturated = Fix::max_value().saturating_to_num::<TooFewIntBits>();
assert_eq!(saturated, TooFewIntBits::max_value());

// 2.5 is 10.1 in binary
let two_point_5 = Fix::from_bits(0b101 << (4 - 1));
assert_eq!(two_point_5.saturating_to_num::<i32>(), 2);
type AllInt = FixedU128<U0>;
assert_eq!(AllInt::max_value().saturating_to_num::<i128>(), i128::max_value());

// 1.625 is 1.101 in binary
let one_point_625 = Fix::from_bits(0b1101 << (4 - 3));
assert_eq!(one_point_625.saturating_to_num::<f32>(), 1.625f32);

pub fn wrapping_from_num<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Creates a fixed-point number from another number, wrapping the value on overflow.

The other number can be:

  • Another fixed-point number. Any extra fractional bits are truncated.
  • An integer of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, or usize.
  • A floating-point number of type f32 or f64. If the f16 feature is enabled, it can also be of type f16. For this conversion, the method rounds to the nearest, with ties rounding to even.
  • Any other number src for which ToFixed is implemented, in which case this method returns src.wrapping_to_fixed().

Panics

For floating-point numbers, panics if the value is not finite.

Examples

use fixed::{
    types::extra::{U0, U4},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(Fix::wrapping_from_num(src), Fix::from_bits(0b111 << (4 - 2)));
// integer 0b1101 << (128 - 7) will wrap to fixed-point 1010...
let too_large = FixedU128::<U0>::from_bits(0b1101 << (128 - 7));
let wrapped = Fix::from_bits(0b1010 << (128 - 4));
assert_eq!(Fix::wrapping_from_num(too_large), wrapped);

// integer 0b1101 << (128 - 7) will wrap to fixed-point 1010...
let large: u128 = 0b1101 << (128 - 7);
let wrapped = Fix::from_bits(0b1010 << (128 - 4));
assert_eq!(Fix::wrapping_from_num(large), wrapped);

// 1.75 is 1.11 in binary
let expected = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::wrapping_from_num(1.75f32), expected);
// 1.75 << (128 - 4) wraps to binary 11000...
let large = 1.75 * 2f32.powi(128 - 4);
let wrapped = Fix::from_bits(0b1100 << (128 - 4));
assert_eq!(Fix::wrapping_from_num(large), wrapped);

pub fn wrapping_to_num<Dst: FromFixed>(self) -> Dst[src]

Converts a fixed-point number to another number, wrapping the value on overflow.

The other number can be:

  • Another fixed-point number. Any extra fractional bits are truncated.
  • An integer of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, or usize. Any fractional bits are truncated.
  • A floating-point number of type f32 or f64. If the f16 feature is enabled, it can also be of type f16. For this conversion, the method rounds to the nearest, with ties rounding to even.
  • Any other type Dst for which FromFixed is implemented, in which case this method returns Dst::wrapping_from_fixed(self).

Examples

use fixed::{
    types::extra::{U0, U4, U6},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = Fix::from_bits(0b111 << (4 - 2));
let expected = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(src.wrapping_to_num::<I16F16>(), expected);
type TooFewIntBits = FixedU128<U6>;
let wrapped = TooFewIntBits::from_bits(Fix::max_value().to_bits() << 2);
assert_eq!(Fix::max_value().wrapping_to_num::<TooFewIntBits>(), wrapped);

// 2.5 is 10.1 in binary
let two_point_5 = Fix::from_bits(0b101 << (4 - 1));
assert_eq!(two_point_5.wrapping_to_num::<i32>(), 2);
type AllInt = FixedU128<U0>;
assert_eq!(AllInt::max_value().wrapping_to_num::<i128>(), -1);

// 1.625 is 1.101 in binary
let one_point_625 = Fix::from_bits(0b1101 << (4 - 3));
assert_eq!(one_point_625.wrapping_to_num::<f32>(), 1.625f32);

pub fn overflowing_from_num<Src: ToFixed>(src: Src) -> (FixedU128<Frac>, bool)[src]

Creates a fixed-point number from another 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.

The other number can be:

Panics

For floating-point numbers, panics if the value is not finite.

Examples

use fixed::{
    types::extra::{U0, U4},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = I16F16::from_bits(0b111 << (16 - 2));
let expected = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::overflowing_from_num(src), (expected, false));
// integer 0b1101 << (128 - 7) will wrap to fixed-point 1010...
let too_large = FixedU128::<U0>::from_bits(0b1101 << (128 - 7));
let wrapped = Fix::from_bits(0b1010 << (128 - 4));
assert_eq!(Fix::overflowing_from_num(too_large), (wrapped, true));

assert_eq!(Fix::overflowing_from_num(3), (Fix::from_bits(3 << 4), false));
// integer 0b1101 << (128 - 7) will wrap to fixed-point 1010...
let large: u128 = 0b1101 << (128 - 7);
let wrapped = Fix::from_bits(0b1010 << (128 - 4));
assert_eq!(Fix::overflowing_from_num(large), (wrapped, true));

// 1.75 is 1.11 in binary
let expected = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::overflowing_from_num(1.75f32), (expected, false));
// 1.75 << (128 - 4) wraps to binary 11000...
let large = 1.75 * 2f32.powi(128 - 4);
let wrapped = Fix::from_bits(0b1100 << (128 - 4));
assert_eq!(Fix::overflowing_from_num(large), (wrapped, true));

pub fn overflowing_to_num<Dst: FromFixed>(self) -> (Dst, bool)[src]

Converts a fixed-point number to another number.

Returns a tuple of the number and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned.

The other number can be:

Examples

use fixed::{
    types::extra::{U0, U4, U6},
    types::I16F16,
    FixedU128,
};
type Fix = FixedU128<U4>;

// 1.75 is 1.11 in binary
let src = Fix::from_bits(0b111 << (4 - 2));
let expected = I16F16::from_bits(0b111 << (16 - 2));
assert_eq!(src.overflowing_to_num::<I16F16>(), (expected, false));
type TooFewIntBits = FixedU128<U6>;
let wrapped = TooFewIntBits::from_bits(Fix::max_value().to_bits() << 2);
assert_eq!(Fix::max_value().overflowing_to_num::<TooFewIntBits>(), (wrapped, true));

// 2.5 is 10.1 in binary
let two_point_5 = Fix::from_bits(0b101 << (4 - 1));
assert_eq!(two_point_5.overflowing_to_num::<i32>(), (2, false));
let does_not_fit = FixedU128::<U0>::max_value();
let wrapped = -1i128;
assert_eq!(does_not_fit.overflowing_to_num::<i128>(), (wrapped, true));

// 1.625 is 1.101 in binary
let one_point_625 = Fix::from_bits(0b1101 << (4 - 3));
assert_eq!(one_point_625.overflowing_to_num::<f32>(), (1.625f32, false));

pub fn from_str_binary(src: &str) -> Result<FixedU128<Frac>, ParseFixedError>[src]

Converts a string slice containing binary digits to a fixed-point number.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 1.75 is 1.11 in binary
let f = Fix::from_str_binary("1.11");
let check = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(f, Ok(check));

pub fn from_str_octal(src: &str) -> Result<FixedU128<Frac>, ParseFixedError>[src]

Converts a string slice containing octal digits to a fixed-point number.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 1.75 is 1.11 in binary, 1.6 in octal
let f = Fix::from_str_octal("1.6");
let check = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(f, Ok(check));

pub fn from_str_hex(src: &str) -> Result<FixedU128<Frac>, ParseFixedError>[src]

Converts a string slice containing hexadecimal digits to a fixed-point number.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 1.75 is 1.11 in binary, 1.C in hexadecimal
let f = Fix::from_str_hex("1.C");
let check = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(f, Ok(check));

pub fn saturating_from_str(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing decimal digits to a fixed-point number, saturating on overflow.

Examples

use fixed::types::U8F8;
assert_eq!(U8F8::saturating_from_str("9999"), Ok(U8F8::max_value()));
assert_eq!(U8F8::saturating_from_str("-1"), Ok(U8F8::from_num(0)));

pub fn saturating_from_str_binary(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing binary digits to a fixed-point number, saturating on overflow.

Examples

use fixed::types::U8F8;
assert_eq!(U8F8::saturating_from_str_binary("101100111000"), Ok(U8F8::max_value()));
assert_eq!(U8F8::saturating_from_str_binary("-1"), Ok(U8F8::from_num(0)));

pub fn saturating_from_str_octal(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing octal digits to a fixed-point number, saturating on overflow.

Examples

use fixed::types::U8F8;
assert_eq!(U8F8::saturating_from_str_octal("7777"), Ok(U8F8::max_value()));
assert_eq!(U8F8::saturating_from_str_octal("-1"), Ok(U8F8::from_num(0)));

pub fn saturating_from_str_hex(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing hexadecimal digits to a fixed-point number, saturating on overflow.

Examples

use fixed::types::U8F8;
assert_eq!(U8F8::saturating_from_str_hex("FFFF"), Ok(U8F8::max_value()));
assert_eq!(U8F8::saturating_from_str_hex("-1"), Ok(U8F8::from_num(0)));

pub fn wrapping_from_str(src: &str) -> Result<FixedU128<Frac>, ParseFixedError>[src]

Converts a string slice containing decimal digits to a fixed-point number, wrapping on overflow.

Examples

use fixed::types::U8F8;
// 9999.5 = 15.5 + 256 × n
assert_eq!(U8F8::wrapping_from_str("9999.5"), Ok(U8F8::from_num(15.5)));
assert_eq!(U8F8::wrapping_from_str("-9999.5"), Ok(U8F8::from_num(240.5)));

pub fn wrapping_from_str_binary(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing binary digits to a fixed-point number, wrapping on overflow.

Examples

use fixed::types::U8F8;
let check = U8F8::from_bits(0b1110001 << (8 - 1));
assert_eq!(U8F8::wrapping_from_str_binary("101100111000.1"), Ok(check));
assert_eq!(U8F8::wrapping_from_str_binary("-101100111000.1"), Ok(check.wrapping_neg()));

pub fn wrapping_from_str_octal(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing octal digits to a fixed-point number, wrapping on overflow.

Examples

use fixed::types::U8F8;
let check = U8F8::from_bits(0o1654 << (8 - 3));
assert_eq!(U8F8::wrapping_from_str_octal("7165.4"), Ok(check));
assert_eq!(U8F8::wrapping_from_str_octal("-7165.4"), Ok(check.wrapping_neg()));

pub fn wrapping_from_str_hex(
    src: &str
) -> Result<FixedU128<Frac>, ParseFixedError>
[src]

Converts a string slice containing hexadecimal digits to a fixed-point number, wrapping on overflow.

Examples

use fixed::types::U8F8;
let check = U8F8::from_bits(0xFFE);
assert_eq!(U8F8::wrapping_from_str_hex("C0F.FE"), Ok(check));
assert_eq!(U8F8::wrapping_from_str_hex("-C0F.FE"), Ok(check.wrapping_neg()));

pub fn overflowing_from_str(
    src: &str
) -> Result<(FixedU128<Frac>, bool), ParseFixedError>
[src]

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.

Examples

use fixed::types::U8F8;
assert_eq!(U8F8::overflowing_from_str("99.5"), Ok((U8F8::from_num(99.5), false)));
// 9999.5 = 15.5 + 256 × n
assert_eq!(U8F8::overflowing_from_str("9999.5"), Ok((U8F8::from_num(15.5), true)));

pub fn overflowing_from_str_binary(
    src: &str
) -> Result<(FixedU128<Frac>, bool), ParseFixedError>
[src]

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.

Examples

use fixed::types::U8F8;
let check = U8F8::from_bits(0b1110001 << (8 - 1));
assert_eq!(U8F8::overflowing_from_str_binary("111000.1"), Ok((check, false)));
assert_eq!(U8F8::overflowing_from_str_binary("101100111000.1"), Ok((check, true)));

pub fn overflowing_from_str_octal(
    src: &str
) -> Result<(FixedU128<Frac>, bool), ParseFixedError>
[src]

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.

Examples

use fixed::types::U8F8;
let check = U8F8::from_bits(0o1654 << (8 - 3));
assert_eq!(U8F8::overflowing_from_str_octal("165.4"), Ok((check, false)));
assert_eq!(U8F8::overflowing_from_str_octal("7165.4"), Ok((check, true)));

pub fn overflowing_from_str_hex(
    src: &str
) -> Result<(FixedU128<Frac>, bool), ParseFixedError>
[src]

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.

Examples

use fixed::types::U8F8;
let check = U8F8::from_bits(0xFFE);
assert_eq!(U8F8::overflowing_from_str_hex("F.FE"), Ok((check, false)));
assert_eq!(U8F8::overflowing_from_str_hex("C0F.FE"), Ok((check, true)));

pub fn int(self) -> FixedU128<Frac>[src]

Returns the integer part.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 0010.0000
let two = Fix::from_num(2);
// 0010.0100
let two_and_quarter = two + two / 8;
assert_eq!(two_and_quarter.int(), two);

pub fn frac(self) -> FixedU128<Frac>[src]

Returns the fractional part.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
// 0000.0100
let quarter = Fix::from_num(1) / 4;
// 0010.0100
let two_and_quarter = quarter * 9;
assert_eq!(two_and_quarter.frac(), quarter);

pub fn ceil(self) -> FixedU128<Frac>[src]

Rounds to the next integer towards +∞.

Panics

When debug assertions are enabled, panics if the result does not fit. When debug assertions are not enabled, the wrapped result can be returned, but it is not considered a breaking change if in the future it panics; if wrapping is required use wrapping_ceil instead.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.ceil(), Fix::from_num(3));

pub fn floor(self) -> FixedU128<Frac>[src]

Rounds to the next integer towards −∞.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.floor(), Fix::from_num(2));

pub fn round(self) -> FixedU128<Frac>[src]

Rounds to the nearest integer, with ties rounded away from zero.

Panics

When debug assertions are enabled, panics if the result does not fit. When debug assertions are not enabled, the wrapped result can be returned, but it is not considered a breaking change if in the future it panics; if wrapping is required use wrapping_round instead.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.round(), Fix::from_num(3));

pub fn checked_ceil(self) -> Option<FixedU128<Frac>>[src]

Checked ceil. Rounds to the next integer towards +∞, returning None on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.checked_ceil(), Some(Fix::from_num(3)));
assert!(Fix::max_value().checked_ceil().is_none());

pub fn checked_floor(self) -> Option<FixedU128<Frac>>[src]

Checked floor. Rounds to the next integer towards −∞.Always returns Some for unsigned values.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.checked_floor(), Some(Fix::from_num(2)));

pub fn checked_round(self) -> Option<FixedU128<Frac>>[src]

Checked round. Rounds to the nearest integer, with ties rounded away from zero, returning None on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.checked_round(), Some(Fix::from_num(3)));
assert!(Fix::max_value().checked_round().is_none());

pub fn saturating_ceil(self) -> FixedU128<Frac>[src]

Saturating ceil. Rounds to the next integer towards +∞, saturating on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.saturating_ceil(), Fix::from_num(3));
assert_eq!(Fix::max_value().saturating_ceil(), Fix::max_value());

pub fn saturating_floor(self) -> FixedU128<Frac>[src]

Saturating floor. Rounds to the next integer towards −∞. Cannot overflow for unsigned values.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.saturating_floor(), Fix::from_num(2));

pub fn saturating_round(self) -> FixedU128<Frac>[src]

Saturating round. Rounds to the nearest integer, with ties rounded away from zero, and saturating on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.saturating_round(), Fix::from_num(3));
assert_eq!(Fix::max_value().saturating_round(), Fix::max_value());

pub fn wrapping_ceil(self) -> FixedU128<Frac>[src]

Wrapping ceil. Rounds to the next integer towards +∞, wrapping on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.wrapping_ceil(), Fix::from_num(3));
assert_eq!(Fix::max_value().wrapping_ceil(), Fix::min_value());

pub fn wrapping_floor(self) -> FixedU128<Frac>[src]

Wrapping floor. Rounds to the next integer towards −∞. Cannot overflow for unsigned values.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.wrapping_floor(), Fix::from_num(2));

pub fn wrapping_round(self) -> FixedU128<Frac>[src]

Wrapping round. Rounds to the next integer to the nearest, with ties rounded away from zero, and wrapping on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.wrapping_round(), Fix::from_num(3));
assert_eq!(Fix::max_value().wrapping_round(), Fix::min_value());

pub fn overflowing_ceil(self) -> (FixedU128<Frac>, bool)[src]

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.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.overflowing_ceil(), (Fix::from_num(3), false));
assert_eq!(Fix::max_value().overflowing_ceil(), (Fix::min_value(), true));

pub fn overflowing_floor(self) -> (FixedU128<Frac>, bool)[src]

Overflowing floor. Rounds to the next integer towards −∞.

Returns a tuple of the fixed-point number and false.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.overflowing_floor(), (Fix::from_num(2), false));

pub fn overflowing_round(self) -> (FixedU128<Frac>, bool)[src]

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.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let two_half = Fix::from_num(5) / 2;
assert_eq!(two_half.overflowing_round(), (Fix::from_num(3), false));
assert_eq!(Fix::max_value().overflowing_round(), (Fix::min_value(), true));

pub fn checked_mul(self, rhs: FixedU128<Frac>) -> Option<FixedU128<Frac>>[src]

Checked multiplication. Returns the product, or None on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::max_value().checked_mul(Fix::from_num(1)), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_mul(Fix::from_num(2)), None);

pub fn checked_div(self, rhs: FixedU128<Frac>) -> Option<FixedU128<Frac>>[src]

Checked division. Returns the quotient, or None if the divisor is zero or on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::max_value().checked_div(Fix::from_num(1)), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_div(Fix::from_num(1) / 2), None);

pub fn saturating_mul(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Saturating multiplication. Returns the product, saturating on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).saturating_mul(Fix::from_num(2)), Fix::from_num(6));
assert_eq!(Fix::max_value().saturating_mul(Fix::from_num(2)), Fix::max_value());

pub fn saturating_div(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Saturating division. Returns the quotient, saturating on overflow.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one_half = Fix::from_num(1) / 2;
assert_eq!(Fix::from_num(1).saturating_div(Fix::from_num(2)), one_half);
assert_eq!(Fix::max_value().saturating_div(one_half), Fix::max_value());

pub fn wrapping_mul(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Wrapping multiplication. Returns the product, wrapping on overflow.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).wrapping_mul(Fix::from_num(2)), Fix::from_num(6));
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().wrapping_mul(Fix::from_num(4)), wrapped);

pub fn wrapping_div(self, rhs: FixedU128<Frac>) -> FixedU128<Frac>[src]

Wrapping division. Returns the quotient, wrapping on overflow.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_num(3).wrapping_div(Fix::from_num(2)), one_point_5);
let quarter = Fix::from_num(1) / 4;
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().wrapping_div(quarter), wrapped);

pub fn overflowing_mul(self, rhs: FixedU128<Frac>) -> (FixedU128<Frac>, bool)[src]

Overflowing multiplication.

Returns a tuple of the product and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
assert_eq!(Fix::from_num(3).overflowing_mul(Fix::from_num(2)), (Fix::from_num(6), false));
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().overflowing_mul(Fix::from_num(4)), (wrapped, true));

pub fn overflowing_div(self, rhs: FixedU128<Frac>) -> (FixedU128<Frac>, bool)[src]

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.

Examples

use fixed::{types::extra::U4, FixedU128};
type Fix = FixedU128<U4>;
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_num(3).overflowing_div(Fix::from_num(2)), (one_point_5, false));
let quarter = Fix::from_num(1) / 4;
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().overflowing_div(quarter), (wrapped, true));

pub fn from_fixed<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by from_num

Creates a fixed-point number from another number.

pub fn to_fixed<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by to_num

Converts a fixed-point number to another number.

pub fn from_int<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by from_num

Creates a fixed-point number from another number.

pub fn to_int<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by to_num

Converts a fixed-point number to another number.

pub fn from_float<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by from_num

Creates a fixed-point number from another number.

pub fn to_float<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by to_num

Converts a fixed-point number to another number.

pub fn checked_from_fixed<Src: ToFixed>(src: Src) -> Option<FixedU128<Frac>>[src]

Deprecated since 0.4.2:

replaced by checked_from_num

Creates a fixed-point number from another number if it fits.

pub fn checked_to_fixed<Dst: FromFixed>(self) -> Option<Dst>[src]

Deprecated since 0.4.2:

replaced by checked_to_num

Converts a fixed-point number to another number if it fits.

pub fn checked_from_int<Src: ToFixed>(src: Src) -> Option<FixedU128<Frac>>[src]

Deprecated since 0.4.2:

replaced by checked_from_num

Creates a fixed-point number from another number if it fits.

pub fn checked_to_int<Dst: FromFixed>(self) -> Option<Dst>[src]

Deprecated since 0.4.2:

replaced by checked_to_num

Converts a fixed-point number to another number if it fits.

pub fn checked_from_float<Src: ToFixed>(src: Src) -> Option<FixedU128<Frac>>[src]

Deprecated since 0.4.2:

replaced by checked_from_num

Creates a fixed-point number from another number if it fits.

pub fn saturating_from_fixed<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by saturating_from_num

Creates a fixed-point number from another number if it fits.

pub fn saturating_to_fixed<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by saturating_to_num

Converts a fixed-point number to another number if it fits.

pub fn saturating_from_int<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by saturating_from_num

Creates a fixed-point number from another number if it fits.

pub fn saturating_to_int<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by saturating_to_num

Converts a fixed-point number to another number if it fits.

pub fn saturating_from_float<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by saturating_from_num

Creates a fixed-point number from another number if it fits.

pub fn wrapping_from_fixed<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by wrapping_from_num

Creates a fixed-point number from another number if it fits.

pub fn wrapping_to_fixed<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by wrapping_to_num

Converts a fixed-point number to another number if it fits.

pub fn wrapping_from_int<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by wrapping_from_num

Creates a fixed-point number from another number if it fits.

pub fn wrapping_to_int<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by wrapping_to_num

Converts a fixed-point number to another number if it fits.

pub fn wrapping_from_float<Src: ToFixed>(src: Src) -> FixedU128<Frac>[src]

Deprecated since 0.4.2:

replaced by wrapping_from_num

Creates a fixed-point number from another number if it fits.

pub fn overflowing_from_fixed<Src: ToFixed>(src: Src) -> (FixedU128<Frac>, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_from_num

Creates a fixed-point number from another number if it fits.

pub fn overflowing_to_fixed<Dst: FromFixed>(self) -> (Dst, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_to_num

Converts a fixed-point number to another number if it fits.

pub fn overflowing_from_int<Src: ToFixed>(src: Src) -> (FixedU128<Frac>, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_from_num

Creates a fixed-point number from another number if it fits.

pub fn overflowing_to_int<Dst: FromFixed>(self) -> (Dst, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_to_num

Converts a fixed-point number to another number if it fits.

pub fn overflowing_from_float<Src: ToFixed>(src: Src) -> (FixedU128<Frac>, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_from_num

Creates a fixed-point number from another number if it fits.

Trait Implementations

impl<Frac: LeEqU128> Fixed for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Fixed for FixedU128<Frac>[src]

type Bits = u128

The primitive integer underlying type.

fn mul_int(self, rhs: Self::Bits) -> Self[src]

Deprecated since 0.4.1:

use lhs * rhs instead of lhs.mul_int(rhs)

Multiplication by an integer.

fn div_int(self, rhs: Self::Bits) -> Self[src]

Deprecated since 0.4.1:

use lhs / rhs instead of lhs.div_int(rhs)

Division by an integer.

fn rem_int(self, rhs: Self::Bits) -> Self[src]

Deprecated since 0.4.1:

use lhs % rhs instead of lhs.rem_int(rhs)

Remainder for division by an integer.

fn from_int<Src: ToFixed>(src: Src) -> Self[src]

Deprecated since 0.4.2:

replaced by from_num

Creates a fixed-point number from another number.

fn to_int<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by to_num

Converts a fixed-point number to another number.

fn from_float<Src: ToFixed>(src: Src) -> Self[src]

Deprecated since 0.4.2:

replaced by from_num

Creates a fixed-point number from another number.

fn to_float<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by to_num

Converts a fixed-point number to another number.

fn checked_from_int<Src: ToFixed>(src: Src) -> Option<Self>[src]

Deprecated since 0.4.2:

replaced by checked_from_num

Creates a fixed-point number from another number.

fn checked_to_int<Dst: FromFixed>(self) -> Option<Dst>[src]

Deprecated since 0.4.2:

replaced by checked_to_num

Converts a fixed-point number to another number.

fn checked_from_float<Src: ToFixed>(src: Src) -> Option<Self>[src]

Deprecated since 0.4.2:

replaced by checked_from_num

Creates a fixed-point number from another number.

fn saturating_from_int<Src: ToFixed>(src: Src) -> Self[src]

Deprecated since 0.4.2:

replaced by saturating_from_num

Creates a fixed-point number from another number.

fn saturating_to_int<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by saturating_to_num

Converts a fixed-point number to another number.

fn saturating_from_float<Src: ToFixed>(src: Src) -> Self[src]

Deprecated since 0.4.2:

replaced by saturating_from_num

Creates a fixed-point number from another number.

fn wrapping_from_int<Src: ToFixed>(src: Src) -> Self[src]

Deprecated since 0.4.2:

replaced by wrapping_from_num

Creates a fixed-point number from another number.

fn wrapping_to_int<Dst: FromFixed>(self) -> Dst[src]

Deprecated since 0.4.2:

replaced by wrapping_to_num

Converts a fixed-point number to another number.

fn wrapping_from_float<Src: ToFixed>(src: Src) -> Self[src]

Deprecated since 0.4.2:

replaced by wrapping_from_num

Creates a fixed-point number from another number.

fn overflowing_from_int<Src: ToFixed>(src: Src) -> (Self, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_from_num

Creates a fixed-point number from another number.

fn overflowing_to_int<Dst: FromFixed>(self) -> (Dst, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_to_num

Converts a fixed-point number to another number.

fn overflowing_from_float<Src: ToFixed>(src: Src) -> (Self, bool)[src]

Deprecated since 0.4.2:

replaced by overflowing_from_num

Creates a fixed-point number from another number.

impl<Frac: LeEqU128> FixedUnsigned for FixedU128<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> LossyFrom<FixedU8<FracSrc>> for FixedU128<FracDst> where
    U8: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU128> LossyFrom<FixedU16<FracSrc>> for FixedU128<FracDst> where
    U16: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU128> LossyFrom<FixedU32<FracSrc>> for FixedU128<FracDst> where
    U32: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U32, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU128> LossyFrom<FixedU64<FracSrc>> for FixedU128<FracDst> where
    U64: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U64, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> LossyFrom<FixedU128<FracSrc>> for FixedU8<FracDst> where
    U128: Sub<FracSrc>,
    U8: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U8, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> LossyFrom<FixedU128<FracSrc>> for FixedI8<FracDst> where
    U128: Sub<FracSrc>,
    U7: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U7, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU16> LossyFrom<FixedU128<FracSrc>> for FixedU16<FracDst> where
    U128: Sub<FracSrc>,
    U16: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U16, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU16> LossyFrom<FixedU128<FracSrc>> for FixedI16<FracDst> where
    U128: Sub<FracSrc>,
    U15: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U15, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU32> LossyFrom<FixedU128<FracSrc>> for FixedU32<FracDst> where
    U128: Sub<FracSrc>,
    U32: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU32> LossyFrom<FixedU128<FracSrc>> for FixedI32<FracDst> where
    U128: Sub<FracSrc>,
    U31: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU64> LossyFrom<FixedU128<FracSrc>> for FixedU64<FracDst> where
    U128: Sub<FracSrc>,
    U64: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U64, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU64> LossyFrom<FixedU128<FracSrc>> for FixedI64<FracDst> where
    U128: Sub<FracSrc>,
    U63: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U63, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU128> LossyFrom<FixedU128<FracSrc>> for FixedU128<FracDst> where
    U128: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU128> LossyFrom<FixedU128<FracSrc>> for FixedI128<FracDst> where
    U128: Sub<FracSrc>,
    U127: Sub<FracDst>,
    Diff<U128, FracSrc>: IsLessOrEqual<Diff<U127, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> LossyFrom<u8> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U8: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> LossyFrom<u16> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U16: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> LossyFrom<u32> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U32: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> LossyFrom<u64> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U64: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl LossyFrom<u128> for FixedU128<U0>[src]

impl<FracDst: LeEqU128> LossyFrom<bool> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U1: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for u8 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U8, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for i8 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U7, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for u16 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U16, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for i16 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U15, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for u32 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U32, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for i32 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U31, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for u64 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U64, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for i64 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U63, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for u128 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U128, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for i128 where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U127, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for usize where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U16, Output = True>, 
[src]

impl<FracSrc: LeEqU128> LossyFrom<FixedU128<FracSrc>> for isize where
    U128: Sub<FracSrc>,
    Diff<U128, FracSrc>: IsLessOrEqual<U15, Output = True>, 
[src]

impl<Frac: LeEqU128> LossyFrom<FixedU128<Frac>> for f16[src]

impl<Frac: LeEqU128> LossyFrom<FixedU128<Frac>> for f32[src]

impl<Frac: LeEqU128> LossyFrom<FixedU128<Frac>> for f64[src]

impl<Frac: LeEqU128> FromFixed for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ToFixed for FixedU128<Frac>[src]

impl<Frac: LeEqU128> FixedOptionalFeatures for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Debug for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Display for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Rem<u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the % operator.

impl<'a, Frac: LeEqU128> Rem<u128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the % operator.

impl<'a, Frac: LeEqU128> Rem<&'a u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the % operator.

impl<'a, 'b, Frac: LeEqU128> Rem<&'a u128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the % operator.

impl<FracLhs: LeEqU8, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedI8<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU16, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedI16<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedI32<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU64, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedI64<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedI128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU8, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedU8<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU16, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedU16<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedU32<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU64, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedU64<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU8> PartialEq<FixedI8<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU16> PartialEq<FixedI16<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU64> PartialEq<FixedI64<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU128> PartialEq<FixedI128<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU8> PartialEq<FixedU8<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU16> PartialEq<FixedU16<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU32> PartialEq<FixedU32<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU64> PartialEq<FixedU64<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<FracLhs: LeEqU128, FracRhs: LeEqU128> PartialEq<FixedU128<FracRhs>> for FixedU128<FracLhs>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<i8> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for i8[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<i16> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for i16[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<i32> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for i32[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<i64> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for i64[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<i128> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for i128[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<isize> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for isize[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<u8> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for u8[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<u16> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for u16[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<u32> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for u32[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<u64> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for u64[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<u128> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for u128[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<usize> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for usize[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<f16> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for f16[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<f32> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for f32[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<f64> for FixedU128<Frac>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for f64[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<Frac: LeEqU128> Eq for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Ord for FixedU128<Frac>[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<FracLhs: LeEqU8, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedI8<FracLhs>[src]

impl<FracLhs: LeEqU16, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedI16<FracLhs>[src]

impl<FracLhs: LeEqU32, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedI32<FracLhs>[src]

impl<FracLhs: LeEqU64, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedI64<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedI128<FracLhs>[src]

impl<FracLhs: LeEqU8, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedU8<FracLhs>[src]

impl<FracLhs: LeEqU16, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedU16<FracLhs>[src]

impl<FracLhs: LeEqU32, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedU32<FracLhs>[src]

impl<FracLhs: LeEqU64, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedU64<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU8> PartialOrd<FixedI8<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU16> PartialOrd<FixedI16<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU64> PartialOrd<FixedI64<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU128> PartialOrd<FixedI128<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU8> PartialOrd<FixedU8<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU16> PartialOrd<FixedU16<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU32> PartialOrd<FixedU32<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU64> PartialOrd<FixedU64<FracRhs>> for FixedU128<FracLhs>[src]

impl<FracLhs: LeEqU128, FracRhs: LeEqU128> PartialOrd<FixedU128<FracRhs>> for FixedU128<FracLhs>[src]

impl<Frac: LeEqU128> PartialOrd<i8> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for i8[src]

impl<Frac: LeEqU128> PartialOrd<i16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for i16[src]

impl<Frac: LeEqU128> PartialOrd<i32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for i32[src]

impl<Frac: LeEqU128> PartialOrd<i64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for i64[src]

impl<Frac: LeEqU128> PartialOrd<i128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for i128[src]

impl<Frac: LeEqU128> PartialOrd<isize> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for isize[src]

impl<Frac: LeEqU128> PartialOrd<u8> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for u8[src]

impl<Frac: LeEqU128> PartialOrd<u16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for u16[src]

impl<Frac: LeEqU128> PartialOrd<u32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for u32[src]

impl<Frac: LeEqU128> PartialOrd<u64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for u64[src]

impl<Frac: LeEqU128> PartialOrd<u128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for u128[src]

impl<Frac: LeEqU128> PartialOrd<usize> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for usize[src]

impl<Frac: LeEqU128> PartialOrd<f16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for f16[src]

impl<Frac: LeEqU128> PartialOrd<f32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for f32[src]

impl<Frac: LeEqU128> PartialOrd<f64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for f64[src]

impl<Frac: LeEqU128> FromStr for FixedU128<Frac>[src]

type Err = ParseFixedError

The associated error which can be returned from parsing.

impl<Frac: LeEqU128> Add<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the + operator.

impl<'a, Frac: LeEqU128> Add<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the + operator.

impl<'a, Frac: LeEqU128> Add<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the + operator.

impl<'a, 'b, Frac: LeEqU128> Add<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the + operator.

impl<Frac: LeEqU128> Sub<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the - operator.

impl<'a, Frac: LeEqU128> Sub<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the - operator.

impl<'a, Frac: LeEqU128> Sub<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the - operator.

impl<'a, 'b, Frac: LeEqU128> Sub<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the - operator.

impl<Frac: LeEqU128> Mul<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU128> Mul<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU128> Mul<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU128> Mul<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU128> Mul<u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU128> Mul<FixedU128<Frac>> for u128[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU128> Mul<u128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU128> Mul<&'a FixedU128<Frac>> for u128[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU128> Mul<&'a u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU128> Mul<FixedU128<Frac>> for &'a u128[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU128> Mul<&'a u128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU128> Mul<&'a FixedU128<Frac>> for &'b u128[src]

type Output = FixedU128<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU128> Div<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU128> Div<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU128> Div<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<'a, 'b, Frac: LeEqU128> Div<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<Frac: LeEqU128> Div<u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU128> Div<u128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU128> Div<&'a u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<'a, 'b, Frac: LeEqU128> Div<&'a u128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the / operator.

impl<Frac: LeEqU128> AddAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> AddAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> SubAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> SubAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> MulAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> MulAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> MulAssign<u128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> MulAssign<&'a u128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> DivAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> DivAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> DivAssign<u128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> DivAssign<&'a u128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> RemAssign<u128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> RemAssign<&'a u128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Not for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the ! operator.

impl<'a, Frac: LeEqU128> Not for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the ! operator.

impl<Frac: LeEqU128> BitAnd<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the & operator.

impl<'a, Frac: LeEqU128> BitAnd<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the & operator.

impl<'a, Frac: LeEqU128> BitAnd<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the & operator.

impl<'a, 'b, Frac: LeEqU128> BitAnd<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the & operator.

impl<Frac: LeEqU128> BitOr<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the | operator.

impl<'a, Frac: LeEqU128> BitOr<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the | operator.

impl<'a, Frac: LeEqU128> BitOr<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the | operator.

impl<'a, 'b, Frac: LeEqU128> BitOr<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the | operator.

impl<Frac: LeEqU128> BitXor<FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the ^ operator.

impl<'a, Frac: LeEqU128> BitXor<FixedU128<Frac>> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the ^ operator.

impl<'a, Frac: LeEqU128> BitXor<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the ^ operator.

impl<'a, 'b, Frac: LeEqU128> BitXor<&'a FixedU128<Frac>> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the ^ operator.

impl<Frac: LeEqU128> Shl<i8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<i8> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a i8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a i8> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<i16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<i16> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a i16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a i16> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<i32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<i32> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a i32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a i32> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<i64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<i64> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a i64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a i64> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<i128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<i128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a i128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a i128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<isize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<isize> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a isize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a isize> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<u8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<u8> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a u8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a u8> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<u16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<u16> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a u16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a u16> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<u32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<u32> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a u32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a u32> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<u64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<u64> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a u64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a u64> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<u128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a u128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shl<usize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<usize> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU128> Shl<&'a usize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac: LeEqU128> Shl<&'a usize> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU128> Shr<i8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<i8> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a i8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a i8> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<i16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<i16> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a i16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a i16> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<i32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<i32> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a i32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a i32> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<i64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<i64> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a i64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a i64> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<i128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<i128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a i128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a i128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<isize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<isize> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a isize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a isize> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<u8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<u8> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a u8> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a u8> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<u16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<u16> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a u16> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a u16> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<u32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<u32> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a u32> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a u32> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<u64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<u64> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a u64> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a u64> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<u128> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a u128> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a u128> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> Shr<usize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<usize> for &'a FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU128> Shr<&'a usize> for FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac: LeEqU128> Shr<&'a usize> for &'b FixedU128<Frac>[src]

type Output = FixedU128<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU128> BitAndAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> BitAndAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> BitOrAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> BitOrAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> BitXorAssign<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> BitXorAssign<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<i8> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a i8> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<i16> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a i16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<i32> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a i32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<i64> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a i64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<i128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a i128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<isize> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a isize> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<u8> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a u8> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<u16> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a u16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<u32> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a u32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<u64> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a u64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<u128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a u128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShlAssign<usize> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShlAssign<&'a usize> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<i8> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a i8> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<i16> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a i16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<i32> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a i32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<i64> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a i64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<i128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a i128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<isize> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a isize> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<u8> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a u8> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<u16> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a u16> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<u32> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a u32> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<u64> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a u64> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<u128> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a u128> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> ShrAssign<usize> for FixedU128<Frac>[src]

impl<'a, Frac: LeEqU128> ShrAssign<&'a usize> for FixedU128<Frac>[src]

impl<Frac> Hash for FixedU128<Frac>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<Frac: LeEqU128> Sum<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: 'a + LeEqU128> Sum<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Product<FixedU128<Frac>> for FixedU128<Frac>[src]

impl<'a, Frac: 'a + LeEqU128> Product<&'a FixedU128<Frac>> for FixedU128<Frac>[src]

impl<Frac> Copy for FixedU128<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> From<FixedU8<FracSrc>> for FixedU128<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U8: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU128> From<FixedU16<FracSrc>> for FixedU128<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U16: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU128> From<FixedU32<FracSrc>> for FixedU128<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U32: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U32, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU128> From<FixedU64<FracSrc>> for FixedU128<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U64: Sub<FracSrc>,
    U128: Sub<FracDst>,
    Diff<U64, FracSrc>: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> From<u8> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U8: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> From<u16> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U16: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> From<u32> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U32: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU128> From<u64> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U64: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl From<u128> for FixedU128<U0>[src]

impl<FracDst: LeEqU128> From<bool> for FixedU128<FracDst> where
    U128: Sub<FracDst>,
    U1: IsLessOrEqual<Diff<U128, FracDst>, Output = True>, 
[src]

impl From<FixedU128<UTerm>> for u128[src]

impl<Frac: LeEqU128> Octal for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Binary for FixedU128<Frac>[src]

impl<Frac: LeEqU128> LowerHex for FixedU128<Frac>[src]

impl<Frac: LeEqU128> UpperHex for FixedU128<Frac>[src]

impl<Frac> Clone for FixedU128<Frac>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<Frac> Default for FixedU128<Frac>[src]

impl<Frac: LeEqU128> Serialize for FixedU128<Frac>[src]

impl<'de, Frac: LeEqU128> Deserialize<'de> for FixedU128<Frac>[src]

Auto Trait Implementations

impl<Frac> Unpin for FixedU128<Frac> where
    Frac: Unpin

impl<Frac> Send for FixedU128<Frac> where
    Frac: Send

impl<Frac> Sync for FixedU128<Frac> where
    Frac: Sync

Blanket Implementations

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]