[][src]Struct fixed::FixedI32

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

A 32-bit fixed-point signed 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::{frac::U3, FixedI32};
let eleven = FixedI32::<U3>::from_int(11);
assert_eq!(eleven, FixedI32::<U3>::from_bits(11 << 3));
assert_eq!(eleven, 11);
assert_eq!(eleven.to_string(), "11.0");
let two_point_75 = eleven / 4;
assert_eq!(two_point_75, FixedI32::<U3>::from_bits(11 << 1));
assert_eq!(two_point_75, 2.75);
assert_eq!(two_point_75.to_string(), "2.8");

Methods

impl<Frac: LeEqU32> FixedI32<Frac>[src]

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

Returns the smallest value that can be represented.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::min_value(), Fix::from_bits(i32::min_value()));

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

Returns the largest value that can be represented.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::max_value(), Fix::from_bits(i32::max_value()));

pub fn int_nbits() -> u32[src]

Returns the number of integer bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U6>;
assert_eq!(Fix::int_nbits(), 32 - 6);

pub fn frac_nbits() -> u32[src]

Returns the number of fractional bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U6>;
assert_eq!(Fix::frac_nbits(), 6);

pub fn from_bits(bits: i32) -> FixedI32<Frac>[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 0010.0000 == 2
assert_eq!(Fix::from_bits(0b10_0000), 2);

pub fn to_bits(self) -> i32[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 2 is 0010.0000
assert_eq!(Fix::from_int(2).to_bits(), 0b10_0000);

pub fn from_fixed<F: Fixed>(val: F) -> FixedI32<Frac>[src]

Creates a fixed-point number from another fixed-point number which can have a different type.

Any extra fractional bits are truncated.

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_from_fixed instead.

Examples

type Src = fixed::FixedI32<fixed::frac::U16>;
type Dst = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (16 - 2));
assert_eq!(Dst::from_fixed(src), Dst::from_bits(0b111 << (4 - 2)));
// src >> 4 is 0.000111, which for Dst is truncated to 0.0001
assert_eq!(Dst::from_fixed(src >> 4), Dst::from_bits(1));

pub fn to_fixed<F: Fixed>(self) -> F[src]

Converts a fixed-point number to another fixed-point number which can have a different type.

Any extra fractional bits are truncated.

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_fixed instead.

Examples

type Src = fixed::FixedI32<fixed::frac::U6>;
type Dst = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (6 - 2));
assert_eq!(src.to_fixed::<Dst>(), Dst::from_bits(0b111 << (4 - 2)));
// src >> 4 is 0.000111, which for Dst is truncated to 0.0001
assert_eq!((src >> 4u32).to_fixed::<Dst>(), Dst::from_bits(1));

pub fn from_int<I: Int>(val: I) -> FixedI32<Frac>[src]

Creates a fixed-point number from an integer.

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

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_from_int instead.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3i32), Fix::from_bits(3 << 4));
assert_eq!(Fix::from_int(-3i64), Fix::from_bits(-3 << 4));

pub fn to_int<I: Int>(self) -> I[src]

Converts a fixed-point number to an integer.

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Any fractional bits are truncated.

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_int instead.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_point_5 = Fix::from_int(5) / 2;
assert_eq!(two_point_5.to_int::<i32>(), 2);
assert_eq!((-two_point_5).to_int::<i64>(), -3);

pub fn from_float<F: Float>(val: F) -> FixedI32<Frac>[src]

Creates a fixed-point number from a floating-point number.

The floating-point number can be of type f32 or f64. If the f16 feature is enabled, it can also be of type f16.

This method rounds to the nearest, with ties rounding to even.

Panics

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_float instead.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
assert_eq!(Fix::from_float(1.75f32), Fix::from_bits(0b111 << (4 - 2)));
assert_eq!(Fix::from_float(-1.75f64), Fix::from_bits(-0b111 << (4-2)));

pub fn to_float<F: Float>(self) -> F[src]

Converts a fixed-point number to a floating-point number.

The floating-point number can be of type f32 or f64. If the f16 feature is enabled, it can also be of type f16.

This method rounds to the nearest, with ties rounding to even.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.625 is 1.101 in binary
assert_eq!(Fix::from_bits(0b1101 << (4 - 3)).to_float::<f32>(), 1.625f32);
assert_eq!(Fix::from_bits(-0b1101 << (4 - 3)).to_float::<f64>(), -1.625f64);
let max_fixed = fixed::FixedU128::<fixed::frac::U0>::max_value();
assert_eq!(max_fixed.to_float::<f32>(), std::f32::INFINITY);

pub fn checked_from_fixed<F: Fixed>(val: F) -> Option<FixedI32<Frac>>[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U16>;
type Dst = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (16 - 2));
assert_eq!(Dst::checked_from_fixed(src), Some(Dst::from_bits(0b111 << (4 - 2))));
let too_large = fixed::FixedI32::<fixed::frac::U2>::max_value();
assert!(Dst::checked_from_fixed(too_large).is_none());

pub fn checked_to_fixed<F: Fixed>(self) -> Option<F>[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U4>;
type Dst = fixed::FixedI32<fixed::frac::U16>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (4 - 2));
let expected = Dst::from_bits(0b111 << (16 - 2));
assert_eq!(src.checked_to_fixed::<Dst>(), Some(expected));
type TooFewIntBits = fixed::FixedI32<fixed::frac::U6>;
assert!(Src::max_value().checked_to_fixed::<TooFewIntBits>().is_none());

pub fn checked_from_int<I: Int>(val: I) -> Option<FixedI32<Frac>>[src]

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

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::checked_from_int(3), Some(Fix::from_bits(3 << 4)));
let too_large = i32::max_value();
assert!(Fix::checked_from_int(too_large).is_none());
let too_small = i32::min_value();
assert!(Fix::checked_from_int(too_small).is_none());

pub fn checked_to_int<I: Int>(self) -> Option<I>[src]

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

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Any fractional bits are truncated.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_point_5 = Fix::from_int(5) / 2;
assert_eq!(two_point_5.checked_to_int::<i32>(), Some(2));
assert_eq!((-two_point_5).checked_to_int::<i64>(), Some(-3));
type AllInt = fixed::FixedI32<fixed::frac::U0>;
assert!(AllInt::from_bits(-1).checked_to_int::<u32>().is_none());

pub fn checked_from_float<F: Float>(val: F) -> Option<FixedI32<Frac>>[src]

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

The floating-point number can be of type f32 or f64. If the f16 feature is enabled, it can also be of type f16.

This method rounds to the nearest, with ties rounding to even.

Examples

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

pub fn saturating_from_fixed<F: Fixed>(val: F) -> FixedI32<Frac>[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U16>;
type Dst = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (16 - 2));
assert_eq!(Dst::saturating_from_fixed(src), Dst::from_bits(0b111 << (4 - 2)));
let too_large = fixed::FixedI32::<fixed::frac::U2>::max_value();
assert_eq!(Dst::saturating_from_fixed(too_large), Dst::max_value());
let too_small = fixed::FixedI32::<fixed::frac::U2>::min_value();
assert_eq!(Dst::saturating_from_fixed(too_small), Dst::min_value());

pub fn saturating_to_fixed<F: Fixed>(self) -> F[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U4>;
type Dst = fixed::FixedI32<fixed::frac::U16>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (4 - 2));
assert_eq!(src.saturating_to_fixed::<Dst>(), Dst::from_bits(0b111 << (16 - 2)));
type TooFewIntBits = fixed::FixedI32<fixed::frac::U6>;
let saturated = Src::max_value().saturating_to_fixed::<TooFewIntBits>();
assert_eq!(saturated, TooFewIntBits::max_value());

pub fn saturating_from_int<I: Int>(val: I) -> FixedI32<Frac>[src]

Creates a fixed-point number from an integer, saturating the value if it does not fit.

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::saturating_from_int(3), Fix::from_bits(3 << 4));
let too_large = i32::max_value();
assert_eq!(Fix::saturating_from_int(too_large), Fix::max_value());
let too_small = i32::min_value();
assert_eq!(Fix::saturating_from_int(too_small), Fix::min_value());

pub fn saturating_to_int<I: Int>(self) -> I[src]

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

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Any fractional bits are truncated.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_point_5 = Fix::from_int(5) / 2;
assert_eq!(two_point_5.saturating_to_int::<i32>(), 2);
assert_eq!((-two_point_5).saturating_to_int::<i64>(), -3);
type AllInt = fixed::FixedI32<fixed::frac::U0>;
assert_eq!(AllInt::from_bits(-1).saturating_to_int::<u32>(), 0);

pub fn saturating_from_float<F: Float>(val: F) -> FixedI32<Frac>[src]

Creates a fixed-point number from a floating-point number, saturating the value if it does not fit.

The floating-point value can be of type f32 or f64. If the f16 feature is enabled, it can also be of type f16.

This method rounds to the nearest, with ties rounding to even.

Panics

This method panics if the value is NaN.

Examples

use std::f64;
type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.625 is 1.101 in binary
let one_point_625 = Fix::from_bits(0b1101 << (4 - 3));
assert_eq!(Fix::saturating_from_float(1.625f32), one_point_625);
assert_eq!(Fix::saturating_from_float(2e38), Fix::max_value());
assert_eq!(Fix::saturating_from_float(f64::NEG_INFINITY), Fix::min_value());

pub fn wrapping_from_fixed<F: Fixed>(val: F) -> FixedI32<Frac>[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U16>;
type Dst = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (16 - 2));
let expected = Dst::from_bits(0b111 << (4 - 2));
assert_eq!(Dst::wrapping_from_fixed(src), expected);
// integer 0b1101 << (32 - 7) will wrap to fixed-point 1010...
let too_large = fixed::FixedI32::<fixed::frac::U0>::from_bits(0b1101 << (32 - 7));
let wrapped = Dst::from_bits(0b1010 << (32 - 4));
assert_eq!(Dst::wrapping_from_fixed(too_large), wrapped);

pub fn wrapping_to_fixed<F: Fixed>(self) -> F[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U4>;
type Dst = fixed::FixedI32<fixed::frac::U16>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (4 - 2));
let expected = Dst::from_bits(0b111 << (16 - 2));
assert_eq!(Dst::wrapping_from_fixed(src), expected);
type TooFewIntBits = fixed::FixedI32<fixed::frac::U6>;
let wrapped = TooFewIntBits::from_bits(Src::max_value().to_bits() << 2);
assert_eq!(Src::max_value().wrapping_to_fixed::<TooFewIntBits>(), wrapped);

pub fn wrapping_from_int<I: Int>(val: I) -> FixedI32<Frac>[src]

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

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::wrapping_from_int(3), Fix::from_bits(3 << 4));
// integer 0b1101 << (32 - 7) will wrap to fixed-point 1010...
let large: i32 = 0b1101 << (32 - 7);
let wrapped = Fix::from_bits(0b1010 << (32 - 4));
assert_eq!(Fix::wrapping_from_int(large), wrapped);

pub fn wrapping_to_int<I: Int>(self) -> I[src]

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

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Any fractional bits are truncated.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_point_5 = Fix::from_int(5) / 2;
assert_eq!(two_point_5.wrapping_to_int::<i32>(), 2);
assert_eq!((-two_point_5).wrapping_to_int::<i64>(), -3);
type AllInt = fixed::FixedI32<fixed::frac::U0>;
assert_eq!(AllInt::from_bits(-1).wrapping_to_int::<u32>(), u32::max_value());

pub fn wrapping_from_float<F: Float>(val: F) -> FixedI32<Frac>[src]

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

The floating-point value can be of type f32 or f64. If the f16 feature is enabled, it can also be of type f16.

This method rounds to the nearest, with ties rounding to even.

Panics

This method panics if the value is not finite.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let from_bits = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::wrapping_from_float(1.75f32), from_bits);
assert_eq!(Fix::wrapping_from_float(-1.75f64), -from_bits);
// 1.75 << (32 - 4) wraps to binary 11000...
let large = 1.75 * 2f32.powi(32 - 4);
let wrapped = Fix::from_bits(0b1100 << (32 - 4));
assert_eq!(Fix::wrapping_from_float(large), wrapped);

pub fn overflowing_from_fixed<F: Fixed>(val: F) -> (FixedI32<Frac>, bool)[src]

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

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U16>;
type Dst = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (16 - 2));
let expected = Dst::from_bits(0b111 << (4 - 2));
assert_eq!(Dst::overflowing_from_fixed(src), (expected, false));
// integer 0b1101 << (32 - 7) will wrap to fixed-point 1010...
let too_large = fixed::FixedI32::<fixed::frac::U0>::from_bits(0b1101 << (32 - 7));
let wrapped = Dst::from_bits(0b1010 << (32 - 4));
assert_eq!(Dst::overflowing_from_fixed(too_large), (wrapped, true));

pub fn overflowing_to_fixed<F: Fixed>(self) -> (F, bool)[src]

Converts a fixed-point number to another 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.

Any extra fractional bits are truncated.

Examples

type Src = fixed::FixedI32<fixed::frac::U4>;
type Dst = fixed::FixedI32<fixed::frac::U16>;
// 1.75 is 1.11 in binary
let src = Src::from_bits(0b111 << (4 - 2));
let expected = Dst::from_bits(0b111 << (16 - 2));
assert_eq!(Dst::overflowing_from_fixed(src), (expected, false));
type TooFewIntBits = fixed::FixedI32<fixed::frac::U6>;
let wrapped = TooFewIntBits::from_bits(Src::max_value().to_bits() << 2);
assert_eq!(Src::max_value().overflowing_to_fixed::<TooFewIntBits>(), (wrapped, true));

pub fn overflowing_from_int<I: Int>(val: I) -> (FixedI32<Frac>, bool)[src]

Creates a fixed-point number from an integer.

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 integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::overflowing_from_int(3), (Fix::from_bits(3 << 4), false));
// integer 0b1101 << (32 - 7) will wrap to fixed-point 1010...
let large: i32 = 0b1101 << (32 - 7);
let wrapped = Fix::from_bits(0b1010 << (32 - 4));
assert_eq!(Fix::overflowing_from_int(large), (wrapped, true));

pub fn overflowing_to_int<I: Int>(self) -> (I, bool)[src]

Converts a fixed-point number to an integer.

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

The integer can be of type i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, and usize.

Any fractional bits are truncated.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_point_5 = Fix::from_int(5) / 2;
assert_eq!(two_point_5.overflowing_to_int::<i32>(), (2, false));
assert_eq!((-two_point_5).overflowing_to_int::<i64>(), (-3, false));
let does_not_fit = fixed::FixedI32::<fixed::frac::U0>::from_bits(-1);
let wrapped = 1u32.wrapping_neg();
assert_eq!(does_not_fit.overflowing_to_int::<u32>(), (wrapped, true));

pub fn overflowing_from_float<F: Float>(val: F) -> (FixedI32<Frac>, bool)[src]

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

The floating-point value can be of type f32 or f64. If the f16 feature is enabled, it can also be of type f16.

This method rounds to the nearest, with ties rounding to even.

Panics

This method panics if the value is not finite.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.75 is 1.11 in binary
let from_bits = Fix::from_bits(0b111 << (4 - 2));
assert_eq!(Fix::overflowing_from_float(1.75f32), (from_bits, false));
assert_eq!(Fix::overflowing_from_float(-1.75f64), (-from_bits, false));
// 1.75 << (32 - 4) wraps to binary 11000...
let large = 1.75 * 2f32.powi(32 - 4);
let wrapped = Fix::from_bits(0b1100 << (32 - 4));
assert_eq!(Fix::overflowing_from_float(large), (wrapped, true));

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::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));
let neg = Fix::from_str_binary("-1.11");
assert_eq!(neg, Ok(-check));

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::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));
let neg = Fix::from_str_octal("-1.6");
assert_eq!(neg, Ok(-check));

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::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));
let neg = Fix::from_str_hex("-1.C");
assert_eq!(neg, Ok(-check));

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

Returns the integer part.

Note that since the numbers are stored in two’s complement, negative numbers with non-zero fractional parts will be rounded towards −∞, except in the case where there are no integer bits, that is FixedI32<U32>, where the return value is always zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 0010.0000
let two = Fix::from_int(2);
// 0010.0100
let two_and_quarter = two + two / 8;
assert_eq!(two_and_quarter.int(), two);
// 1101.0000
let three = Fix::from_int(3);
// 1101.1100
assert_eq!((-two_and_quarter).int(), -three);

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

Returns the fractional part.

Note that since the numbers are stored in two’s complement, the returned fraction will be non-negative for negative numbers, except in the case where there are no integer bits, that is FixedI32<U32> where the return value is always equal to self.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 0000.0100
let quarter = Fix::from_int(1) / 4;
// 0010.0100
let two_and_quarter = quarter * 9;
assert_eq!(two_and_quarter.frac(), quarter);
// 0000.1100
let three_quarters = quarter * 3;
// 1101.1100
assert_eq!((-two_and_quarter).frac(), three_quarters);

pub fn ceil(self) -> FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.ceil(), Fix::from_int(3));
assert_eq!((-two_half).ceil(), Fix::from_int(-2));

pub fn floor(self) -> FixedI32<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_floor instead.

Overflow can only occur when there are zero integer bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.floor(), Fix::from_int(2));
assert_eq!((-two_half).floor(), Fix::from_int(-3));

pub fn round(self) -> FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.round(), Fix::from_int(3));
assert_eq!((-two_half).round(), Fix::from_int(-3));

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.checked_ceil(), Some(Fix::from_int(3)));
assert_eq!((-two_half).checked_ceil(), Some(Fix::from_int(-2)));
assert!(Fix::max_value().checked_ceil().is_none());

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

Checked floor. Rounds to the next integer towards −∞.Returns None on overflow.

Overflow can only occur when there are zero integer bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.checked_floor(), Some(Fix::from_int(2)));
assert_eq!((-two_half).checked_floor(), Some(Fix::from_int(-3)));
type AllFrac = fixed::FixedI32<fixed::frac::U32>;
assert!(AllFrac::min_value().checked_floor().is_none());

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.checked_round(), Some(Fix::from_int(3)));
assert_eq!((-two_half).checked_round(), Some(Fix::from_int(-3)));
assert!(Fix::max_value().checked_round().is_none());

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.saturating_ceil(), Fix::from_int(3));
assert_eq!((-two_half).saturating_ceil(), Fix::from_int(-2));
assert_eq!(Fix::max_value().saturating_ceil(), Fix::max_value());

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

Saturating floor. Rounds to the next integer towards −∞, saturating on overflow.

Overflow can only occur when there are zero integer bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.saturating_floor(), Fix::from_int(2));
assert_eq!((-two_half).saturating_floor(), Fix::from_int(-3));
type AllFrac = fixed::FixedI32<fixed::frac::U32>;
assert_eq!(AllFrac::min_value().saturating_floor(), AllFrac::min_value());

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.saturating_round(), Fix::from_int(3));
assert_eq!((-two_half).saturating_round(), Fix::from_int(-3));
assert_eq!(Fix::max_value().saturating_round(), Fix::max_value());

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.wrapping_ceil(), Fix::from_int(3));
assert_eq!((-two_half).wrapping_ceil(), Fix::from_int(-2));
assert_eq!(Fix::max_value().wrapping_ceil(), Fix::min_value());

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

Wrapping floor. Rounds to the next integer towards −∞, wrapping on overflow.

Overflow can only occur when there are zero integer bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.wrapping_floor(), Fix::from_int(2));
assert_eq!((-two_half).wrapping_floor(), Fix::from_int(-3));
type AllFrac = fixed::FixedI32<fixed::frac::U32>;
assert_eq!(AllFrac::min_value().wrapping_floor(), AllFrac::from_int(0));

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.wrapping_round(), Fix::from_int(3));
assert_eq!((-two_half).wrapping_round(), Fix::from_int(-3));
assert_eq!(Fix::max_value().wrapping_round(), Fix::min_value());

pub fn overflowing_ceil(self) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.overflowing_ceil(), (Fix::from_int(3), false));
assert_eq!((-two_half).overflowing_ceil(), (Fix::from_int(-2), false));
assert_eq!(Fix::max_value().overflowing_ceil(), (Fix::min_value(), true));

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

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

Returns a tuple of the fixed-point number and a bool, indicating whether an overflow has occurred. On overflow, the wrapped value isreturned. Overflow can only occur when there are zero integer bits.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.overflowing_floor(), (Fix::from_int(2), false));
assert_eq!((-two_half).overflowing_floor(), (Fix::from_int(-3), false));
type AllFrac = fixed::FixedI32<fixed::frac::U32>;
assert_eq!(AllFrac::min_value().overflowing_floor(), (AllFrac::from_int(0), true));

pub fn overflowing_round(self) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let two_half = Fix::from_int(5) / 2;
assert_eq!(two_half.overflowing_round(), (Fix::from_int(3), false));
assert_eq!((-two_half).overflowing_round(), (Fix::from_int(-3), false));
assert_eq!(Fix::max_value().overflowing_round(), (Fix::min_value(), true));

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

Returns the number of ones in the binary representation.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let f = Fix::from_bits(0b11_0010);
assert_eq!(f.count_ones(), 3);

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

Returns the number of zeros in the binary representation.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let f = Fix::from_bits(!0b11_0010);
assert_eq!(f.count_zeros(), 3);

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

Returns the number of leading zeros in the binary representation.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let f = Fix::from_bits(0b10_0000);
assert_eq!(f.leading_zeros(), 32 - 6);

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

Returns the number of trailing zeros in the binary representation.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let f = Fix::from_bits(0b10_0000);
assert_eq!(f.trailing_zeros(), 5);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let bits: i32 = (0b111 << (32 - 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 fn rotate_right(self, n: u32) -> FixedI32<Frac>[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let bits: i32 = 0b1010111;
let rot = (0b111 << (32 - 3)) | 0b1010;
assert_eq!(bits.rotate_right(3), rot);
assert_eq!(Fix::from_bits(bits).rotate_right(3), Fix::from_bits(rot));

pub fn abs(self) -> FixedI32<Frac>[src]

Returns the absolute value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let five = Fix::from_int(5);
let minus_five = Fix::from_int(-5);
assert_eq!(five.abs(), five);
assert_eq!(minus_five.abs(), five);

pub fn signum(self) -> FixedI32<Frac>[src]

Returns a number representing the sign of self.

Panics

When debug assertions are enabled, this method panics

  • if the value is positive and the fixed-point number has zero or one integer bits such that it cannot hold the value 1.
  • if the value is negative and the fixed-point number has zero integer bits, such that it cannot hold the value −1.

When debug assertions are not enabled, the wrapped value can be returned in those cases, but it is not considered a breaking change if in the future it panics; using this method when 1 and −1 cannot be represented is almost certainly a bug.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(5).signum(), 1);
assert_eq!(Fix::from_int(0).signum(), 0);
assert_eq!(Fix::from_int(-5).signum(), -1);

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

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

Overflow can only occur when negating the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(5).checked_neg(), Some(Fix::from_int(-5)));
assert_eq!(Fix::min_value().checked_neg(), None);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one = Fix::from_int(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: FixedI32<Frac>) -> Option<FixedI32<Frac>>[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one = Fix::from_int(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(self, rhs: FixedI32<Frac>) -> Option<FixedI32<Frac>>[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::max_value().checked_mul(Fix::from_int(1)), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_mul(Fix::from_int(2)), None);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::max_value().checked_div(Fix::from_int(1)), Some(Fix::max_value()));
assert_eq!(Fix::max_value().checked_div(Fix::from_int(1) / 2), None);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::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: i32) -> Option<FixedI32<Frac>>[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::max_value().checked_div_int(1), Some(Fix::max_value()));
assert_eq!(Fix::from_int(1).checked_div_int(0), None);
assert_eq!(Fix::min_value().checked_div_int(-1), None);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::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_int(1).checked_rem_int(0), None);
assert_eq!(Fix::min_value().checked_rem_int(-1), None);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!((Fix::from_int(1) / 2).checked_shl(3), Some(Fix::from_int(4)));
assert_eq!((Fix::from_int(1) / 2).checked_shl(32), None);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(4).checked_shr(3), Some(Fix::from_int(1) / 2));
assert_eq!(Fix::from_int(4).checked_shr(32), None);

pub fn checked_abs(self) -> Option<FixedI32<Frac>>[src]

Checked absolute value. Returns the absolute value, or None on overflow.

Overflow can only occur when trying to find the absolute value of the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(-5).checked_abs(), Some(Fix::from_int(5)));
assert_eq!(Fix::min_value().checked_abs(), None);

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

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

Overflow can only occur when negating the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(5).saturating_neg(), Fix::from_int(-5));
assert_eq!(Fix::min_value().saturating_neg(), Fix::max_value());

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

Saturating addition. Returns the sum, saturating on overflow.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).saturating_add(Fix::from_int(2)), Fix::from_int(5));
assert_eq!(Fix::max_value().saturating_add(Fix::from_int(1)), Fix::max_value());

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

Saturating subtraction. Returns the difference, saturating on overflow.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(1).saturating_sub(Fix::from_int(3)), Fix::from_int(-2));
assert_eq!(Fix::min_value().saturating_sub(Fix::from_int(1)), Fix::min_value());

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

Saturating multiplication. Returns the product, saturating on overflow.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).saturating_mul(Fix::from_int(2)), Fix::from_int(6));
assert_eq!(Fix::max_value().saturating_mul(Fix::from_int(2)), Fix::max_value());

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

Saturating division. Returns the quotient, saturating on overflow.

Panics

Panics if the divisor is zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one_half = Fix::from_int(1) / 2;
assert_eq!(Fix::from_int(1).saturating_div(Fix::from_int(2)), one_half);
assert_eq!(Fix::max_value().saturating_div(one_half), Fix::max_value());

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).saturating_mul_int(2), Fix::from_int(6));
assert_eq!(Fix::max_value().saturating_mul_int(2), Fix::max_value());

pub fn saturating_abs(self) -> FixedI32<Frac>[src]

Saturating absolute value. Returns the absolute value, saturating on overflow.

Overflow can only occur when trying to find the absolute value of the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(-5).saturating_abs(), Fix::from_int(5));
assert_eq!(Fix::min_value().saturating_abs(), Fix::max_value());

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

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

Overflow can only occur when negating the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(5).wrapping_neg(), Fix::from_int(-5));
assert_eq!(Fix::min_value().wrapping_neg(), Fix::min_value());

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

Wrapping addition. Returns the sum, wrapping on overflow.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one = Fix::from_int(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_int(3).wrapping_add(Fix::from_int(2)), Fix::from_int(5));
assert_eq!(Fix::max_value().wrapping_add(one), Fix::min_value() + one_minus_bit);

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

Wrapping subtraction. Returns the difference, wrapping on overflow.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one = Fix::from_int(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_int(3).wrapping_sub(Fix::from_int(5)), Fix::from_int(-2));
assert_eq!(Fix::min_value().wrapping_sub(one), Fix::max_value() - one_minus_bit);

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

Wrapping multiplication. Returns the product, wrapping on overflow.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).wrapping_mul(Fix::from_int(2)), Fix::from_int(6));
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().wrapping_mul(Fix::from_int(4)), wrapped);

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

Wrapping division. Returns the quotient, wrapping on overflow.

Panics

Panics if the divisor is zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_int(3).wrapping_div(Fix::from_int(2)), one_point_5);
let quarter = Fix::from_int(1) / 4;
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().wrapping_div(quarter), wrapped);

pub fn wrapping_mul_int(self, rhs: i32) -> FixedI32<Frac>[src]

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).wrapping_mul_int(2), Fix::from_int(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: i32) -> FixedI32<Frac>[src]

Wrapping division by an integer. Returns the quotient, wrapping on overflow.

Overflow can only occur when dividing the minimum value by −1.

Panics

Panics if the divisor is zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.5 is binary 1.1
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_int(3).wrapping_div_int(2), one_point_5);
assert_eq!(Fix::min_value().wrapping_div_int(-1), Fix::min_value());

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

Wrapping fixed-point remainder for division by an integer. Returns the remainder, wrapping on overflow.

Overflow can only occur when dividing the minimum value by −1.

Panics

Panics if the divisor is zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::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));
assert_eq!(Fix::min_value().wrapping_rem_int(-1), 0);

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!((Fix::from_int(1) / 2).wrapping_shl(3), Fix::from_int(4));
assert_eq!((Fix::from_int(1) / 2).wrapping_shl(3 + 32), Fix::from_int(4));

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

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

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!((Fix::from_int(4)).wrapping_shr(3), Fix::from_int(1) / 2);
assert_eq!((Fix::from_int(4)).wrapping_shr(3 + 32), Fix::from_int(1) / 2);

pub fn wrapping_abs(self) -> FixedI32<Frac>[src]

Wrapping absolute value. Returns the absolute value, wrapping on overflow.

Overflow can only occur when trying to find the absolute value of the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(-5).wrapping_abs(), Fix::from_int(5));
assert_eq!(Fix::min_value().wrapping_abs(), Fix::min_value());

pub fn overflowing_neg(self) -> (FixedI32<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.

Overflow can only occur when negating the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(5).overflowing_neg(), (Fix::from_int(-5), false));
assert_eq!(Fix::min_value().overflowing_neg(), (Fix::min_value(), true));

pub fn overflowing_add(self, rhs: FixedI32<Frac>) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one = Fix::from_int(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_int(3).overflowing_add(Fix::from_int(2)), (Fix::from_int(5), false));
assert_eq!(Fix::max_value().overflowing_add(one), (Fix::min_value() + one_minus_bit, true));

pub fn overflowing_sub(self, rhs: FixedI32<Frac>) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one = Fix::from_int(1);
let one_minus_bit = one - Fix::from_bits(1);
assert_eq!(Fix::from_int(3).overflowing_sub(Fix::from_int(5)), (Fix::from_int(-2), false));
assert_eq!(Fix::min_value().overflowing_sub(one), (Fix::max_value() - one_minus_bit, true));

pub fn overflowing_mul(self, rhs: FixedI32<Frac>) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).overflowing_mul(Fix::from_int(2)), (Fix::from_int(6), false));
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().overflowing_mul(Fix::from_int(4)), (wrapped, true));

pub fn overflowing_div(self, rhs: FixedI32<Frac>) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_int(3).overflowing_div(Fix::from_int(2)), (one_point_5, false));
let quarter = Fix::from_int(1) / 4;
let wrapped = Fix::from_bits(!0 << 2);
assert_eq!(Fix::max_value().overflowing_div(quarter), (wrapped, true));

pub fn overflowing_mul_int(self, rhs: i32) -> (FixedI32<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

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(3).overflowing_mul_int(2), (Fix::from_int(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: i32) -> (FixedI32<Frac>, bool)[src]

Overflowing division by an integer.

Returns a tuple of the quotient and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned. Overflow can only occur when dividing the minimum value by −1.

Panics

Panics if the divisor is zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
// 1.5 is binary 1.1
let one_point_5 = Fix::from_bits(0b11 << (4 - 1));
assert_eq!(Fix::from_int(3).overflowing_div_int(2), (one_point_5, false));
assert_eq!(Fix::min_value().overflowing_div_int(-1), (Fix::min_value(), true));

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

Overflowing fixed-point remainder for division by an integer.

Returns a tuple of the remainder and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned. Overflow can only occur when dividing the minimum value by −1.

Panics

Panics if the divisor is zero.

Examples

type Fix = fixed::FixedI32<fixed::frac::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));
assert_eq!(Fix::min_value().overflowing_rem_int(-1), (Fix::from_int(0), true));

pub fn overflowing_shl(self, rhs: u32) -> (FixedI32<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 ≥ 32. On overflow rhs is wrapped before the shift operation.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!((Fix::from_int(1) / 2).overflowing_shl(3), (Fix::from_int(4), false));
assert_eq!((Fix::from_int(1) / 2).overflowing_shl(3 + 32), (Fix::from_int(4), true));

pub fn overflowing_shr(self, rhs: u32) -> (FixedI32<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 ≥ 32. On overflow rhs is wrapped before the shift operation.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!((Fix::from_int(4)).overflowing_shr(3), (Fix::from_int(1) / 2, false));
assert_eq!((Fix::from_int(4)).overflowing_shr(3 + 32), (Fix::from_int(1) / 2, true));

pub fn overflowing_abs(self) -> (FixedI32<Frac>, bool)[src]

Overflowing absolute value.

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

Overflow can only occur when trying to find the absolute value of the minimum value.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert_eq!(Fix::from_int(-5).overflowing_abs(), (Fix::from_int(5), false));
assert_eq!(Fix::min_value().overflowing_abs(), (Fix::min_value(), true));

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

Returns true if the number is > 0.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert!(Fix::from_int(5).is_positive());
assert!(!Fix::from_int(0).is_positive());
assert!(!Fix::from_int(-5).is_positive());

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

Returns true if the number is < 0.

Examples

type Fix = fixed::FixedI32<fixed::frac::U4>;
assert!(!Fix::from_int(5).is_negative());
assert!(!Fix::from_int(0).is_negative());
assert!(Fix::from_int(-5).is_negative());

Trait Implementations

impl<Frac: LeEqU32> Fixed for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Fixed for FixedI32<Frac>[src]

type Bits = i32

The primitive integer underlying type.

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

Deprecated since 0.4.1:

use Mul<Self::Bits> trait instead

Multiplication by an integer.

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

Deprecated since 0.4.1:

use Div<Self::Bits> trait instead

Division by an integer.

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

Deprecated since 0.4.1:

use Rem<Self::Bits> trait instead

Remainder for division by an integer.

impl<Frac: LeEqU32> FixedSigned for FixedI32<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> LossyFrom<FixedI8<FracSrc>> for FixedI32<FracDst> where
    U8: Sub<FracSrc>,
    U32: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> LossyFrom<FixedU8<FracSrc>> for FixedI32<FracDst> where
    U8: Sub<FracSrc>,
    U31: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU32> LossyFrom<FixedI16<FracSrc>> for FixedI32<FracDst> where
    U16: Sub<FracSrc>,
    U32: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU32> LossyFrom<FixedU16<FracSrc>> for FixedI32<FracDst> where
    U16: Sub<FracSrc>,
    U31: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> LossyFrom<FixedI32<FracSrc>> for FixedI8<FracDst> where
    U32: Sub<FracSrc>,
    U8: Sub<FracDst>,
    Diff<U32, FracSrc>: IsLessOrEqual<Diff<U8, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU16> LossyFrom<FixedI32<FracSrc>> for FixedI16<FracDst> where
    U32: Sub<FracSrc>,
    U16: Sub<FracDst>,
    Diff<U32, FracSrc>: IsLessOrEqual<Diff<U16, FracDst>, Output = True>, 
[src]

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

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

impl<FracSrc: LeEqU32, FracDst: LeEqU64> LossyFrom<FixedI32<FracSrc>> for FixedI64<FracDst> where
    U32: Sub<FracSrc>,
    U64: Sub<FracDst>,
    Diff<U32, FracSrc>: IsLessOrEqual<Diff<U64, FracDst>, Output = True>, 
[src]

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

impl<FracSrc: LeEqU64, FracDst: LeEqU32> LossyFrom<FixedI64<FracSrc>> for FixedI32<FracDst> where
    U64: Sub<FracSrc>,
    U32: Sub<FracDst>,
    Diff<U64, FracSrc>: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU32> LossyFrom<FixedU64<FracSrc>> for FixedI32<FracDst> where
    U64: Sub<FracSrc>,
    U31: Sub<FracDst>,
    Diff<U64, FracSrc>: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU32> LossyFrom<FixedI128<FracSrc>> for FixedI32<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<FracDst: LeEqU32> LossyFrom<i8> for FixedI32<FracDst> where
    U32: Sub<FracDst>,
    U8: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU32> LossyFrom<u8> for FixedI32<FracDst> where
    U31: Sub<FracDst>,
    U8: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU32> LossyFrom<i16> for FixedI32<FracDst> where
    U32: Sub<FracDst>,
    U16: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU32> LossyFrom<u16> for FixedI32<FracDst> where
    U31: Sub<FracDst>,
    U16: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl LossyFrom<i32> for FixedI32<U0>[src]

impl<FracSrc: LeEqU32> LossyFrom<FixedI32<FracSrc>> for i8 where
    U32: Sub<FracSrc>,
    Diff<U32, FracSrc>: IsLessOrEqual<U8, Output = True>, 
[src]

impl<FracSrc: LeEqU32> LossyFrom<FixedI32<FracSrc>> for i16 where
    U32: Sub<FracSrc>,
    Diff<U32, FracSrc>: IsLessOrEqual<U16, Output = True>, 
[src]

impl<FracSrc: LeEqU32> LossyFrom<FixedI32<FracSrc>> for i32 where
    U32: Sub<FracSrc>,
    Diff<U32, FracSrc>: IsLessOrEqual<U32, Output = True>, 
[src]

impl<FracSrc: LeEqU32> LossyFrom<FixedI32<FracSrc>> for i64 where
    U32: Sub<FracSrc>,
    Diff<U32, FracSrc>: IsLessOrEqual<U64, Output = True>, 
[src]

impl<FracSrc: LeEqU32> LossyFrom<FixedI32<FracSrc>> for i128 where
    U32: Sub<FracSrc>,
    Diff<U32, FracSrc>: IsLessOrEqual<U128, Output = True>, 
[src]

impl<FracSrc: LeEqU32> LossyFrom<FixedI32<FracSrc>> for isize where
    U32: Sub<FracSrc>,
    Diff<U32, FracSrc>: IsLessOrEqual<U16, Output = True>, 
[src]

impl<Frac: LeEqU32> LossyFrom<FixedI32<Frac>> for f16[src]

impl<Frac: LeEqU32> LossyFrom<FixedI32<Frac>> for f32[src]

impl<Frac: LeEqU32> LossyFrom<FixedI32<Frac>> for f64[src]

impl<Frac: LeEqU32> FromFixed for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ToFixed for FixedI32<Frac>[src]

impl<Frac: LeEqU32> FixedOptionalFeatures for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Display for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Debug for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Div<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU32> Div<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU32> Div<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<'a, 'b, Frac: LeEqU32> Div<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<Frac: LeEqU32> Div<i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU32> Div<i32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU32> Div<&'a i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<'a, 'b, Frac: LeEqU32> Div<&'a i32> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the / operator.

impl<FracLhs: LeEqU8, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedI8<FracLhs>[src]

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

This method tests for !=.

impl<FracLhs: LeEqU16, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedI16<FracLhs>[src]

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

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU8> PartialEq<FixedI8<FracRhs>> for FixedI32<FracLhs>[src]

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

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU16> PartialEq<FixedI16<FracRhs>> for FixedI32<FracLhs>[src]

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

This method tests for !=.

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

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

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU64> PartialEq<FixedI64<FracRhs>> for FixedI32<FracLhs>[src]

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

This method tests for !=.

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

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

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU8> PartialEq<FixedU8<FracRhs>> for FixedI32<FracLhs>[src]

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

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU16> PartialEq<FixedU16<FracRhs>> for FixedI32<FracLhs>[src]

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

This method tests for !=.

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

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

This method tests for !=.

impl<FracLhs: LeEqU32, FracRhs: LeEqU64> PartialEq<FixedU64<FracRhs>> for FixedI32<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<Frac: LeEqU32> PartialEq<i8> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for i8[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<i16> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for i16[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<i32> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for i32[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<i64> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for i64[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<i128> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for i128[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<isize> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for isize[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<u8> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for u8[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<u16> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for u16[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<u32> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for u32[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<u64> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for u64[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<u128> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for u128[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<usize> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for usize[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<f16> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for f16[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<f32> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for f32[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<f64> for FixedI32<Frac>[src]

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

This method tests for !=.

impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for f64[src]

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

This method tests for !=.

impl<FracLhs: LeEqU64, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedI64<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 FixedI128<FracLhs>[src]

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

This method tests for !=.

impl<FracLhs: LeEqU8, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedU8<FracLhs>[src]

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

This method tests for !=.

impl<FracLhs: LeEqU16, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedU16<FracLhs>[src]

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

This method tests for !=.

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

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

This method tests for !=.

impl<FracLhs: LeEqU64, FracRhs: LeEqU32> PartialEq<FixedI32<FracRhs>> for FixedU64<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<Frac: LeEqU32> Eq for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Ord for FixedI32<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: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedI8<FracLhs>[src]

impl<FracLhs: LeEqU16, FracRhs: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedI16<FracLhs>[src]

impl<FracLhs: LeEqU32, FracRhs: LeEqU8> PartialOrd<FixedI8<FracRhs>> for FixedI32<FracLhs>[src]

impl<FracLhs: LeEqU32, FracRhs: LeEqU16> PartialOrd<FixedI16<FracRhs>> for FixedI32<FracLhs>[src]

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

impl<FracLhs: LeEqU32, FracRhs: LeEqU64> PartialOrd<FixedI64<FracRhs>> for FixedI32<FracLhs>[src]

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

impl<FracLhs: LeEqU32, FracRhs: LeEqU8> PartialOrd<FixedU8<FracRhs>> for FixedI32<FracLhs>[src]

impl<FracLhs: LeEqU32, FracRhs: LeEqU16> PartialOrd<FixedU16<FracRhs>> for FixedI32<FracLhs>[src]

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

impl<FracLhs: LeEqU32, FracRhs: LeEqU64> PartialOrd<FixedU64<FracRhs>> for FixedI32<FracLhs>[src]

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

impl<Frac: LeEqU32> PartialOrd<i8> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for i8[src]

impl<Frac: LeEqU32> PartialOrd<i16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for i16[src]

impl<Frac: LeEqU32> PartialOrd<i32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for i32[src]

impl<Frac: LeEqU32> PartialOrd<i64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for i64[src]

impl<Frac: LeEqU32> PartialOrd<i128> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for i128[src]

impl<Frac: LeEqU32> PartialOrd<isize> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for isize[src]

impl<Frac: LeEqU32> PartialOrd<u8> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for u8[src]

impl<Frac: LeEqU32> PartialOrd<u16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for u16[src]

impl<Frac: LeEqU32> PartialOrd<u32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for u32[src]

impl<Frac: LeEqU32> PartialOrd<u64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for u64[src]

impl<Frac: LeEqU32> PartialOrd<u128> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for u128[src]

impl<Frac: LeEqU32> PartialOrd<usize> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for usize[src]

impl<Frac: LeEqU32> PartialOrd<f16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for f16[src]

impl<Frac: LeEqU32> PartialOrd<f32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for f32[src]

impl<Frac: LeEqU32> PartialOrd<f64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for f64[src]

impl<FracLhs: LeEqU64, FracRhs: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedI64<FracLhs>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedU8<FracLhs>[src]

impl<FracLhs: LeEqU16, FracRhs: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedU16<FracLhs>[src]

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

impl<FracLhs: LeEqU64, FracRhs: LeEqU32> PartialOrd<FixedI32<FracRhs>> for FixedU64<FracLhs>[src]

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

impl<Frac: LeEqU32> Add<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the + operator.

impl<'a, Frac: LeEqU32> Add<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the + operator.

impl<'a, Frac: LeEqU32> Add<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the + operator.

impl<'a, 'b, Frac: LeEqU32> Add<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the + operator.

impl<Frac: LeEqU32> Sub<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the - operator.

impl<'a, Frac: LeEqU32> Sub<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the - operator.

impl<'a, Frac: LeEqU32> Sub<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the - operator.

impl<'a, 'b, Frac: LeEqU32> Sub<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the - operator.

impl<Frac: LeEqU32> Mul<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU32> Mul<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU32> Mul<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU32> Mul<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU32> Mul<i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU32> Mul<FixedI32<Frac>> for i32[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU32> Mul<i32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU32> Mul<&'a FixedI32<Frac>> for i32[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU32> Mul<&'a i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU32> Mul<FixedI32<Frac>> for &'a i32[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU32> Mul<&'a i32> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU32> Mul<&'a FixedI32<Frac>> for &'b i32[src]

type Output = FixedI32<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU32> Rem<i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the % operator.

impl<'a, Frac: LeEqU32> Rem<i32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the % operator.

impl<'a, Frac: LeEqU32> Rem<&'a i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the % operator.

impl<'a, 'b, Frac: LeEqU32> Rem<&'a i32> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the % operator.

impl<Frac: LeEqU32> Neg for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the - operator.

impl<'a, Frac: LeEqU32> Neg for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the - operator.

impl<Frac: LeEqU32> AddAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> AddAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> SubAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> SubAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> MulAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> MulAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> MulAssign<i32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> MulAssign<&'a i32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> DivAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> DivAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> DivAssign<i32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> DivAssign<&'a i32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> RemAssign<i32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> RemAssign<&'a i32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Not for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the ! operator.

impl<'a, Frac: LeEqU32> Not for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the ! operator.

impl<Frac: LeEqU32> BitAnd<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the & operator.

impl<'a, Frac: LeEqU32> BitAnd<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the & operator.

impl<'a, Frac: LeEqU32> BitAnd<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the & operator.

impl<'a, 'b, Frac: LeEqU32> BitAnd<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the & operator.

impl<Frac: LeEqU32> BitOr<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the | operator.

impl<'a, Frac: LeEqU32> BitOr<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the | operator.

impl<'a, Frac: LeEqU32> BitOr<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the | operator.

impl<'a, 'b, Frac: LeEqU32> BitOr<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the | operator.

impl<Frac: LeEqU32> BitXor<FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the ^ operator.

impl<'a, Frac: LeEqU32> BitXor<FixedI32<Frac>> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the ^ operator.

impl<'a, Frac: LeEqU32> BitXor<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the ^ operator.

impl<'a, 'b, Frac: LeEqU32> BitXor<&'a FixedI32<Frac>> for &'b FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the ^ operator.

impl<Frac: LeEqU32> Shl<i8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<i8> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a i8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<i16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<i16> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a i16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<i32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<i64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<i64> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a i64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<i128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<i128> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a i128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<isize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<isize> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a isize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<u8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<u8> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a u8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<u16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<u16> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a u16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<u32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<u32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a u32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<u64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<u64> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a u64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<u128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<u128> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a u128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shl<usize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<usize> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<'a, Frac: LeEqU32> Shl<&'a usize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the << operator.

impl<Frac: LeEqU32> Shr<i8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<i8> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a i8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<i16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<i16> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a i16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<i32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a i32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<i64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<i64> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a i64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<i128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<i128> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a i128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<isize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<isize> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a isize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<u8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<u8> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a u8> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<u16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<u16> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a u16> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<u32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<u32> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a u32> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<u64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<u64> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a u64> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<u128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<u128> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a u128> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> Shr<usize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<usize> for &'a FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac: LeEqU32> Shr<&'a usize> for FixedI32<Frac>[src]

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

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

type Output = FixedI32<Frac>

The resulting type after applying the >> operator.

impl<Frac: LeEqU32> BitAndAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> BitAndAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> BitOrAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> BitOrAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> BitXorAssign<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> BitXorAssign<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<i8> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a i8> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<i16> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a i16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<i32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a i32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<i64> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a i64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<i128> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a i128> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<isize> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a isize> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<u8> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a u8> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<u16> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a u16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<u32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a u32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<u64> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a u64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<u128> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a u128> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShlAssign<usize> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShlAssign<&'a usize> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<i8> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a i8> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<i16> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a i16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<i32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a i32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<i64> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a i64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<i128> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a i128> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<isize> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a isize> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<u8> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a u8> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<u16> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a u16> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<u32> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a u32> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<u64> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a u64> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<u128> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a u128> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> ShrAssign<usize> for FixedI32<Frac>[src]

impl<'a, Frac: LeEqU32> ShrAssign<&'a usize> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Hash for FixedI32<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: LeEqU32> Product<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: 'a + LeEqU32> Product<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Sum<FixedI32<Frac>> for FixedI32<Frac>[src]

impl<'a, Frac: 'a + LeEqU32> Sum<&'a FixedI32<Frac>> for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Copy for FixedI32<Frac>[src]

impl<Frac: LeEqU32> FromStr for FixedI32<Frac>[src]

type Err = ParseFixedError

The associated error which can be returned from parsing.

impl<FracSrc: LeEqU8, FracDst: LeEqU32> From<FixedI8<FracSrc>> for FixedI32<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U8: Sub<FracSrc>,
    U32: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> From<FixedU8<FracSrc>> for FixedI32<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U8: Sub<FracSrc>,
    U31: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU32> From<FixedI16<FracSrc>> for FixedI32<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U16: Sub<FracSrc>,
    U32: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU32> From<FixedU16<FracSrc>> for FixedI32<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U16: Sub<FracSrc>,
    U31: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU64> From<FixedI32<FracSrc>> for FixedI64<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U32: Sub<FracSrc>,
    U64: Sub<FracDst>,
    Diff<U32, FracSrc>: IsLessOrEqual<Diff<U64, FracDst>, Output = True>, 
[src]

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

impl<FracDst: LeEqU32> From<i8> for FixedI32<FracDst> where
    U32: Sub<FracDst>,
    U8: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU32> From<u8> for FixedI32<FracDst> where
    U31: Sub<FracDst>,
    U8: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU32> From<i16> for FixedI32<FracDst> where
    U32: Sub<FracDst>,
    U16: IsLessOrEqual<Diff<U32, FracDst>, Output = True>, 
[src]

impl<FracDst: LeEqU32> From<u16> for FixedI32<FracDst> where
    U31: Sub<FracDst>,
    U16: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl From<i32> for FixedI32<U0>[src]

impl<FracDst: LeEqU32> From<bool> for FixedI32<FracDst> where
    U31: Sub<FracDst>,
    U1: IsLessOrEqual<Diff<U31, FracDst>, Output = True>, 
[src]

impl From<FixedI32<UTerm>> for i32[src]

impl From<FixedI32<UTerm>> for i64[src]

impl From<FixedI32<UTerm>> for i128[src]

impl<Frac: LeEqU32> From<FixedI32<Frac>> for f64[src]

impl<Frac: LeEqU32> Octal for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Binary for FixedI32<Frac>[src]

impl<Frac: LeEqU32> LowerHex for FixedI32<Frac>[src]

impl<Frac: LeEqU32> UpperHex for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Clone for FixedI32<Frac>[src]

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

Performs copy-assignment from source. Read more

impl<Frac: LeEqU32> Default for FixedI32<Frac>[src]

impl<Frac: LeEqU32> Serialize for FixedI32<Frac>[src]

impl<'de, Frac: LeEqU32> Deserialize<'de> for FixedI32<Frac>[src]

Auto Trait Implementations

impl<Frac> Unpin for FixedI32<Frac> where
    Frac: Unpin

impl<Frac> Sync for FixedI32<Frac> where
    Frac: Sync

impl<Frac> Send for FixedI32<Frac> where
    Frac: Send

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]