[][src]Struct fixed::FixedI8

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

An eight-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::{types::extra::U3, FixedI8};
let eleven = FixedI8::<U3>::from_num(11);
assert_eq!(eleven, FixedI8::<U3>::from_bits(11 << 3));
assert_eq!(eleven, 11);
assert_eq!(eleven.to_string(), "11");
let two_point_75 = eleven / 4;
assert_eq!(two_point_75, FixedI8::<U3>::from_bits(11 << 1));
assert_eq!(two_point_75, 2.75);
assert_eq!(two_point_75.to_string(), "2.8");

Methods

impl<Frac> FixedI8<Frac>[src]

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

Returns the smallest value that can be represented.

Examples

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

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

Returns the largest value that can be represented.

Examples

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

pub const fn from_bits(bits: i8) -> FixedI8<Frac>[src]

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

Examples

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

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

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

Examples

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

pub fn from_be_bytes(bytes: [u8; 1]) -> FixedI8<Frac>[src]

Creates a fixed-point number from its representation as a byte array in big endian.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(
    Fix::from_be_bytes([0x12]),
    Fix::from_bits(0x12)
);

pub fn from_le_bytes(bytes: [u8; 1]) -> FixedI8<Frac>[src]

Creates a fixed-point number from its representation as a byte array in little endian.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(
    Fix::from_le_bytes([0x12]),
    Fix::from_bits(0x12)
);

pub fn from_ne_bytes(bytes: [u8; 1]) -> FixedI8<Frac>[src]

Creates a fixed-point number from its representation as a byte array in native endian.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(
    if cfg!(target_endian = "big") {
        Fix::from_ne_bytes([0x12])
    } else {
        Fix::from_ne_bytes([0x12])
    },
    Fix::from_bits(0x12)
);

pub fn to_be_bytes(self) -> [u8; 1][src]

Returns the memory representation of this fixed-point number as a byte array in big-endian byte order.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
let val = Fix::from_bits(0x12);
assert_eq!(
    val.to_be_bytes(),
    [0x12]
);

pub fn to_le_bytes(self) -> [u8; 1][src]

Returns the memory representation of this fixed-point number as a byte array in little-endian byte order.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
let val = Fix::from_bits(0x12);
assert_eq!(
    val.to_le_bytes(),
    [0x12]
);

pub fn to_ne_bytes(self) -> [u8; 1][src]

Returns the memory representation of this fixed-point number as a byte array in native byte order.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
let val = Fix::from_bits(0x12);
assert_eq!(
    val.to_ne_bytes(),
    if cfg!(target_endian = "big") {
        [0x12]
    } else {
        [0x12]
    }
);

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

Returns the number of ones in the binary representation.

Examples

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

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

Returns the number of zeros in the binary representation.

Examples

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

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

Returns the number of leading zeros in the binary representation.

Examples

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

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

Returns the number of trailing zeros in the binary representation.

Examples

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

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

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

Examples

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

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

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

Examples

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

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

Returns true if the number is > 0.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert!(Fix::from_num(5).is_positive());
assert!(!Fix::from_num(0).is_positive());
assert!(!Fix::from_num(-5).is_positive());

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

Returns true if the number is < 0.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert!(!Fix::from_num(5).is_negative());
assert!(!Fix::from_num(0).is_negative());
assert!(Fix::from_num(-5).is_negative());

pub fn rem_euclid(self, rhs: FixedI8<Frac>) -> FixedI8<Frac>[src]

Remainder for Euclidean division.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).rem_euclid(Fix::from_num(2)), Fix::from_num(1.5));
assert_eq!(Fix::from_num(-7.5).rem_euclid(Fix::from_num(2)), Fix::from_num(0.5));

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

Returns the absolute value.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
let five = Fix::from_num(5);
let minus_five = Fix::from_num(-5);
assert_eq!(five.abs(), five);
assert_eq!(minus_five.abs(), five);

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

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

Overflow can only occur when negating the minimum value.

Examples

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

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

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

Examples

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

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

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

Examples

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

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

Checked remainder. Returns the remainder, or None if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(1.5).checked_rem(Fix::from_num(1)), Some(Fix::from_num(0.5)));
assert_eq!(Fix::from_num(1.5).checked_rem(Fix::from_num(0)), None);

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<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: i8) -> Option<FixedI8<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

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

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

Checked remainder for Euclidean division. Returns the remainder, or None if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
let num = Fix::from_num(7.5);
assert_eq!(num.checked_rem_euclid(Fix::from_num(2)), Some(Fix::from_num(1.5)));
assert_eq!(num.checked_rem_euclid(Fix::from_num(0)), None);
assert_eq!((-num).checked_rem_euclid(Fix::from_num(2)), Some(Fix::from_num(0.5)));

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

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

Examples

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

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

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

Examples

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

pub fn checked_abs(self) -> Option<FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(-5).checked_abs(), Some(Fix::from_num(5)));
assert_eq!(Fix::min_value().checked_abs(), None);

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

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

Overflow can only occur when negating the minimum value.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(5).saturating_neg(), Fix::from_num(-5));
assert_eq!(Fix::min_value().saturating_neg(), Fix::max_value());

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

Saturating addition. Returns the sum, saturating on overflow.

Examples

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

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

Saturating subtraction. Returns the difference, saturating on overflow.

Examples

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

pub const fn saturating_mul_int(self, rhs: i8) -> FixedI8<Frac>[src]

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

Examples

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

pub const fn saturating_abs(self) -> FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(-5).saturating_abs(), Fix::from_num(5));
assert_eq!(Fix::min_value().saturating_abs(), Fix::max_value());

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

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

Overflow can only occur when negating the minimum value.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(5).wrapping_neg(), Fix::from_num(-5));
assert_eq!(Fix::min_value().wrapping_neg(), Fix::min_value());

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

Wrapping addition. Returns the sum, wrapping on overflow.

Examples

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

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

Wrapping subtraction. Returns the difference, wrapping on overflow.

Examples

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

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

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

Examples

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

pub fn wrapping_div_int(self, rhs: i8) -> FixedI8<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

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

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

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

Examples

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

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

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

Examples

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

pub const fn wrapping_abs(self) -> FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(-5).wrapping_abs(), Fix::from_num(5));
assert_eq!(Fix::min_value().wrapping_abs(), Fix::min_value());

pub const fn overflowing_neg(self) -> (FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(5).overflowing_neg(), (Fix::from_num(-5), false));
assert_eq!(Fix::min_value().overflowing_neg(), (Fix::min_value(), true));

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

Overflowing addition.

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

Examples

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

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

Overflowing subtraction.

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

Examples

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

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

Overflowing multiplication by an integer.

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

Examples

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

pub fn overflowing_div_int(self, rhs: i8) -> (FixedI8<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

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

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

Examples

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

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

Examples

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

pub const fn overflowing_abs(self) -> (FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(-5).overflowing_abs(), (Fix::from_num(5), false));
assert_eq!(Fix::min_value().overflowing_abs(), (Fix::min_value(), true));

impl<Frac: LeEqU8> FixedI8<Frac>[src]

pub const INT_NBITS: u32[src]

The number of integer bits.

Examples

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

pub const FRAC_NBITS: u32[src]

The number of fractional bits.

Examples

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

pub fn int_nbits() -> u32[src]

Returns the number of integer bits.

Examples

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

pub fn frac_nbits() -> u32[src]

Returns the number of fractional bits.

Examples

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

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

Creates a fixed-point number from another number.

The other number can be:

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

Panics

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

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

Examples

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

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

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

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

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

Converts a fixed-point number to another number.

The other number can be:

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

Panics

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

Examples

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

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

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

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

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

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

The other number can be:

Examples

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

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

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

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

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

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

The other number can be:

Examples

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

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

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

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

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

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

The other number can be:

Panics

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

Examples

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

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

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

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

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

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

The other number can be:

Examples

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

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

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

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

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

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

The other number can be:

Panics

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

Examples

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

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

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

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

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

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

The other number can be:

Examples

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

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

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

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

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

Creates a fixed-point number from another number.

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

The other number can be:

Panics

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

Examples

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

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

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

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

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

Converts a fixed-point number to another number.

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

The other number can be:

Examples

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

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

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

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

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<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<FixedI8<Frac>, ParseFixedError>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<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<FixedI8<Frac>, ParseFixedError>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<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 saturating_from_str(src: &str) -> Result<FixedI8<Frac>, ParseFixedError>[src]

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

Examples

use fixed::types::I8F8;
assert_eq!(I8F8::saturating_from_str("9999"), Ok(I8F8::max_value()));
assert_eq!(I8F8::saturating_from_str("-9999"), Ok(I8F8::min_value()));

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

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

Examples

use fixed::types::I8F8;
assert_eq!(I8F8::saturating_from_str_binary("101100111000"), Ok(I8F8::max_value()));
assert_eq!(I8F8::saturating_from_str_binary("-101100111000"), Ok(I8F8::min_value()));

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

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

Examples

use fixed::types::I8F8;
assert_eq!(I8F8::saturating_from_str_octal("7777"), Ok(I8F8::max_value()));
assert_eq!(I8F8::saturating_from_str_octal("-7777"), Ok(I8F8::min_value()));

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

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

Examples

use fixed::types::I8F8;
assert_eq!(I8F8::saturating_from_str_hex("FFFF"), Ok(I8F8::max_value()));
assert_eq!(I8F8::saturating_from_str_hex("-FFFF"), Ok(I8F8::min_value()));

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

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

Examples

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

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

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

Examples

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

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

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

Examples

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

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

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

Examples

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

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

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

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

Examples

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

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

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

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

Examples

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

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

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

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

Examples

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

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

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

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

Examples

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

pub fn int(self) -> FixedI8<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 FixedI8<U8>, where the return value is always zero.

Examples

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

pub fn frac(self) -> FixedI8<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 FixedI8<U8> where the return value is always equal to self.

Examples

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

pub fn round_to_zero(self) -> FixedI8<Frac>[src]

Rounds to the next integer towards 0.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.1).round_to_zero(), Fix::from_num(2));
assert_eq!(Fix::from_num(2.9).round_to_zero(), Fix::from_num(2));
assert_eq!(Fix::from_num(-2.1).round_to_zero(), Fix::from_num(-2));
assert_eq!(Fix::from_num(-2.9).round_to_zero(), Fix::from_num(-2));

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

Rounds to the next integer towards +∞.

Panics

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).ceil(), Fix::from_num(3));
assert_eq!(Fix::from_num(-2.5).ceil(), Fix::from_num(-2));

pub fn floor(self) -> FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).floor(), Fix::from_num(2));
assert_eq!(Fix::from_num(-2.5).floor(), Fix::from_num(-3));

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

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

Panics

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).round(), Fix::from_num(3));
assert_eq!(Fix::from_num(-2.5).round(), Fix::from_num(-3));

pub fn round_ties_to_even(self) -> FixedI8<Frac>[src]

Rounds to the nearest integer, with ties rounded to even.

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).round_ties_to_even(), Fix::from_num(2));
assert_eq!(Fix::from_num(3.5).round_ties_to_even(), Fix::from_num(4));

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).checked_ceil(), Some(Fix::from_num(3)));
assert_eq!(Fix::from_num(-2.5).checked_ceil(), Some(Fix::from_num(-2)));
assert!(Fix::max_value().checked_ceil().is_none());

pub fn checked_floor(self) -> Option<FixedI8<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

use fixed::{
    types::extra::{U4, U8},
    FixedI8,
};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).checked_floor(), Some(Fix::from_num(2)));
assert_eq!(Fix::from_num(-2.5).checked_floor(), Some(Fix::from_num(-3)));
type AllFrac = FixedI8<U8>;
assert!(AllFrac::min_value().checked_floor().is_none());

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).checked_round(), Some(Fix::from_num(3)));
assert_eq!(Fix::from_num(-2.5).checked_round(), Some(Fix::from_num(-3)));
assert!(Fix::max_value().checked_round().is_none());

pub fn checked_round_ties_to_even(self) -> Option<FixedI8<Frac>>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).checked_round_ties_to_even(), Some(Fix::from_num(2)));
assert_eq!(Fix::from_num(3.5).checked_round_ties_to_even(), Some(Fix::from_num(4)));
assert!(Fix::max_value().checked_round_ties_to_even().is_none());

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).saturating_ceil(), Fix::from_num(3));
assert_eq!(Fix::from_num(-2.5).saturating_ceil(), Fix::from_num(-2));
assert_eq!(Fix::max_value().saturating_ceil(), Fix::max_value());

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

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

Overflow can only occur when there are zero integer bits.

Examples

use fixed::{
    types::extra::{U4, U8},
    FixedI8,
};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).saturating_floor(), Fix::from_num(2));
assert_eq!(Fix::from_num(-2.5).saturating_floor(), Fix::from_num(-3));
type AllFrac = FixedI8<U8>;
assert_eq!(AllFrac::min_value().saturating_floor(), AllFrac::min_value());

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).saturating_round(), Fix::from_num(3));
assert_eq!(Fix::from_num(-2.5).saturating_round(), Fix::from_num(-3));
assert_eq!(Fix::max_value().saturating_round(), Fix::max_value());

pub fn saturating_round_ties_to_even(self) -> FixedI8<Frac>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).saturating_round_ties_to_even(), Fix::from_num(2));
assert_eq!(Fix::from_num(3.5).saturating_round_ties_to_even(), Fix::from_num(4));
assert_eq!(Fix::max_value().saturating_round_ties_to_even(), Fix::max_value());

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).wrapping_ceil(), Fix::from_num(3));
assert_eq!(Fix::from_num(-2.5).wrapping_ceil(), Fix::from_num(-2));
assert_eq!(Fix::max_value().wrapping_ceil(), Fix::min_value());

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

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

Overflow can only occur when there are zero integer bits.

Examples

use fixed::{
    types::extra::{U4, U8},
    FixedI8,
};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).wrapping_floor(), Fix::from_num(2));
assert_eq!(Fix::from_num(-2.5).wrapping_floor(), Fix::from_num(-3));
type AllFrac = FixedI8<U8>;
assert_eq!(AllFrac::min_value().wrapping_floor(), AllFrac::from_num(0));

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).wrapping_round(), Fix::from_num(3));
assert_eq!(Fix::from_num(-2.5).wrapping_round(), Fix::from_num(-3));
assert_eq!(Fix::max_value().wrapping_round(), Fix::min_value());

pub fn wrapping_round_ties_to_even(self) -> FixedI8<Frac>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).wrapping_round_ties_to_even(), Fix::from_num(2));
assert_eq!(Fix::from_num(3.5).wrapping_round_ties_to_even(), Fix::from_num(4));
assert_eq!(Fix::max_value().wrapping_round_ties_to_even(), Fix::min_value());

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

Overflowing ceil. Rounds to the next integer towards +∞.

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).overflowing_ceil(), (Fix::from_num(3), false));
assert_eq!(Fix::from_num(-2.5).overflowing_ceil(), (Fix::from_num(-2), false));
assert_eq!(Fix::max_value().overflowing_ceil(), (Fix::min_value(), true));

pub fn overflowing_floor(self) -> (FixedI8<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

use fixed::{
    types::extra::{U4, U8},
    FixedI8,
};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).overflowing_floor(), (Fix::from_num(2), false));
assert_eq!(Fix::from_num(-2.5).overflowing_floor(), (Fix::from_num(-3), false));
type AllFrac = FixedI8<U8>;
assert_eq!(AllFrac::min_value().overflowing_floor(), (AllFrac::from_num(0), true));

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

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).overflowing_round(), (Fix::from_num(3), false));
assert_eq!(Fix::from_num(-2.5).overflowing_round(), (Fix::from_num(-3), false));
assert_eq!(Fix::max_value().overflowing_round(), (Fix::min_value(), true));

pub fn overflowing_round_ties_to_even(self) -> (FixedI8<Frac>, bool)[src]

Overflowing round. Rounds to the next integer to the nearest, with ties rounded to even.

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(2.5).overflowing_round_ties_to_even(), (Fix::from_num(2), false));
assert_eq!(Fix::from_num(3.5).overflowing_round_ties_to_even(), (Fix::from_num(4), false));
assert_eq!(Fix::max_value().overflowing_round_ties_to_even(), (Fix::min_value(), true));

pub fn signum(self) -> FixedI8<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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(5).signum(), 1);
assert_eq!(Fix::from_num(0).signum(), 0);
assert_eq!(Fix::from_num(-5).signum(), -1);

pub fn div_euclid(self, rhs: FixedI8<Frac>) -> FixedI8<Frac>[src]

Euclidean division.

Panics

Panics if the divisor is zero.

When debug assertions are enabled, this method also panics if the division overflows. 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_div_euclid instead.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).div_euclid(Fix::from_num(2)), Fix::from_num(3));
assert_eq!(Fix::from_num(-7.5).div_euclid(Fix::from_num(2)), Fix::from_num(-4));

pub fn div_euclid_int(self, rhs: i8) -> FixedI8<Frac>[src]

Euclidean division by an integer.

Panics

Panics if the divisor is zero.

When debug assertions are enabled, this method also panics if the division overflows. Overflow can only occur when dividing the minimum value by −1. 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_div_euclid_int instead.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).div_euclid_int(2), Fix::from_num(3));
assert_eq!(Fix::from_num(-7.5).div_euclid_int(2), Fix::from_num(-4));

pub fn rem_euclid_int(self, rhs: i8) -> FixedI8<Frac>[src]

Remainder for Euclidean division by an integer.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).rem_euclid_int(2), Fix::from_num(1.5));
assert_eq!(Fix::from_num(-7.5).rem_euclid_int(2), Fix::from_num(0.5));

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

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

Examples

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

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

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

Examples

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

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).checked_div_euclid(Fix::from_num(2)), Some(Fix::from_num(3)));
assert_eq!(Fix::from_num(7.5).checked_div_euclid(Fix::from_num(0)), None);
assert_eq!(Fix::max_value().checked_div_euclid(Fix::from_num(0.25)), None);
assert_eq!(Fix::from_num(-7.5).checked_div_euclid(Fix::from_num(2)), Some(Fix::from_num(-4)));

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

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(3.75).checked_rem_int(2), Some(Fix::from_num(1.75)));
assert_eq!(Fix::from_num(3.75).checked_rem_int(0), None);
assert_eq!(Fix::from_num(-3.75).checked_rem_int(2), Some(Fix::from_num(-1.75)));

pub fn checked_div_euclid_int(self, rhs: i8) -> Option<FixedI8<Frac>>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).checked_div_euclid_int(2), Some(Fix::from_num(3)));
assert_eq!(Fix::from_num(7.5).checked_div_euclid_int(0), None);
assert_eq!(Fix::min_value().checked_div_euclid_int(-1), None);

pub fn checked_rem_euclid_int(self, rhs: i8) -> Option<FixedI8<Frac>>[src]

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

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).checked_rem_euclid_int(2), Some(Fix::from_num(1.5)));
assert_eq!(Fix::from_num(7.5).checked_rem_euclid_int(0), None);
assert_eq!(Fix::from_num(-7.5).checked_rem_euclid_int(2), Some(Fix::from_num(0.5)));
// −8 ≤ Fix < 8, so the answer 12.5 overflows
assert_eq!(Fix::from_num(-7.5).checked_rem_euclid_int(20), None);

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

Saturating multiplication. Returns the product, saturating on overflow.

Examples

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

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

Saturating division. Returns the quotient, saturating on overflow.

Panics

Panics if the divisor is zero.

Examples

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

pub fn saturating_div_euclid(self, rhs: FixedI8<Frac>) -> FixedI8<Frac>[src]

Saturating Euclidean division. Returns the quotient, saturating on overflow.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).saturating_div_euclid(Fix::from_num(2)), Fix::from_num(3));
assert_eq!(Fix::max_value().saturating_div_euclid(Fix::from_num(0.25)), Fix::max_value());
assert_eq!(Fix::from_num(-7.5).saturating_div_euclid(Fix::from_num(2)), Fix::from_num(-4));
assert_eq!(Fix::min_value().saturating_div_euclid(Fix::from_num(0.25)), Fix::min_value());

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

Wrapping multiplication. Returns the product, wrapping on overflow.

Examples

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

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

Wrapping division. Returns the quotient, wrapping on overflow.

Panics

Panics if the divisor is zero.

Examples

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

pub fn wrapping_div_euclid(self, rhs: FixedI8<Frac>) -> FixedI8<Frac>[src]

Wrapping Euclidean division. Returns the quotient, wrapping on overflow.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).wrapping_div_euclid(Fix::from_num(2)), Fix::from_num(3));
let wrapped = Fix::max_value().wrapping_mul_int(4).round_to_zero();
assert_eq!(Fix::max_value().wrapping_div_euclid(Fix::from_num(0.25)), wrapped);

pub fn wrapping_div_euclid_int(self, rhs: i8) -> FixedI8<Frac>[src]

Wrapping Euclidean 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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).wrapping_div_euclid_int(2), Fix::from_num(3));
assert_eq!(Fix::from_num(-7.5).wrapping_div_euclid_int(2), Fix::from_num(-4));
let wrapped = Fix::min_value().round_to_zero();
assert_eq!(Fix::min_value().wrapping_div_euclid_int(-1), wrapped);

pub fn wrapping_rem_euclid_int(self, rhs: i8) -> FixedI8<Frac>[src]

Wrapping remainder for Euclidean division by an integer. Returns the remainder, wrapping on overflow.

Note that while remainder for Euclidean division cannot be negative, the wrapped value can be negative.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).wrapping_rem_euclid_int(2), Fix::from_num(1.5));
assert_eq!(Fix::from_num(-7.5).wrapping_rem_euclid_int(2), Fix::from_num(0.5));
// −8 ≤ Fix < 8, so the answer 12.5 wraps to −3.5
assert_eq!(Fix::from_num(-7.5).wrapping_rem_euclid_int(20), Fix::from_num(-3.5));

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

Overflowing multiplication.

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

Examples

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

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

Overflowing division.

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

Panics

Panics if the divisor is zero.

Examples

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

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

Overflowing Euclidean division.

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

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
let check = Fix::from_num(3);
assert_eq!(Fix::from_num(7.5).overflowing_div_euclid(Fix::from_num(2)), (check, false));
let wrapped = Fix::max_value().wrapping_mul_int(4).round_to_zero();
assert_eq!(Fix::max_value().overflowing_div_euclid(Fix::from_num(0.25)), (wrapped, true));

pub fn overflowing_div_euclid_int(self, rhs: i8) -> (FixedI8<Frac>, bool)[src]

Overflowing Euclidean 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

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).overflowing_div_euclid_int(2), (Fix::from_num(3), false));
assert_eq!(Fix::from_num(-7.5).overflowing_div_euclid_int(2), (Fix::from_num(-4), false));
let wrapped = Fix::min_value().round_to_zero();
assert_eq!(Fix::min_value().overflowing_div_euclid_int(-1), (wrapped, true));

pub fn overflowing_rem_euclid_int(self, rhs: i8) -> (FixedI8<Frac>, bool)[src]

Remainder for Euclidean 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.

Note that while remainder for Euclidean division cannot be negative, the wrapped value can be negative.

Panics

Panics if the divisor is zero.

Examples

use fixed::{types::extra::U4, FixedI8};
type Fix = FixedI8<U4>;
assert_eq!(Fix::from_num(7.5).overflowing_rem_euclid_int(2), (Fix::from_num(1.5), false));
assert_eq!(Fix::from_num(-7.5).overflowing_rem_euclid_int(2), (Fix::from_num(0.5), false));
// −8 ≤ Fix < 8, so the answer 12.5 wraps to −3.5
assert_eq!(Fix::from_num(-7.5).overflowing_rem_euclid_int(20), (Fix::from_num(-3.5), true));

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

Deprecated since 0.5.3:

cannot overflow, use % or Rem::rem instead

Remainder for division by an integer.

Panics

Panics if the divisor is zero.

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

Deprecated since 0.5.3:

cannot overflow, use % or Rem::rem instead

Remainder for division by an integer.

Panics

Panics if the divisor is zero.

Trait Implementations

impl<'a, Frac> Add<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the + operator.

impl<'a, 'b, Frac> Add<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the + operator.

impl<Frac> Add<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the + operator.

impl<'a, Frac> Add<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the + operator.

impl<'a, Frac> AddAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac> AddAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Binary for FixedI8<Frac>[src]

impl<'a, Frac> BitAnd<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the & operator.

impl<'a, 'b, Frac> BitAnd<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the & operator.

impl<Frac> BitAnd<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the & operator.

impl<'a, Frac> BitAnd<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the & operator.

impl<'a, Frac> BitAndAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac> BitAndAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac> BitOr<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the | operator.

impl<'a, 'b, Frac> BitOr<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the | operator.

impl<Frac> BitOr<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the | operator.

impl<'a, Frac> BitOr<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the | operator.

impl<'a, Frac> BitOrAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac> BitOrAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac> BitXor<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the ^ operator.

impl<'a, 'b, Frac> BitXor<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the ^ operator.

impl<Frac> BitXor<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the ^ operator.

impl<'a, Frac> BitXor<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the ^ operator.

impl<'a, Frac> BitXorAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac> BitXorAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> Cast<FixedI128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> Cast<FixedI16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> Cast<FixedI32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> Cast<FixedI64<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for bool[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for u64[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> Cast<FixedI8<Frac>> for u32[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedI16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedI32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedI64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedI128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedU8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedU16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedU32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedU64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> Cast<FixedI8<FracDst>> for FixedU128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> Cast<FixedU128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> Cast<FixedU16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> Cast<FixedU32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> Cast<FixedU64<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> Cast<FixedU8<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> Cast<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Cast<usize> for FixedI8<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> CheckedCast<FixedI128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> CheckedCast<FixedI16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> CheckedCast<FixedI32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> CheckedCast<FixedI64<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for bool[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for u64[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for u32[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedI16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedI32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedI64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedI128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedU8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedU16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedU32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedU64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> CheckedCast<FixedI8<FracDst>> for FixedU128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> CheckedCast<FixedU128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> CheckedCast<FixedU16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> CheckedCast<FixedU32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> CheckedCast<FixedU64<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> CheckedCast<FixedU8<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> CheckedCast<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> CheckedCast<usize> for FixedI8<Frac>[src]

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

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

impl<Frac: LeEqU8> Debug for FixedI8<Frac>[src]

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

impl<'de, Frac: LeEqU8> Deserialize<'de> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Display for FixedI8<Frac>[src]

impl<'a, Frac: LeEqU8> Div<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<'a, 'b, Frac: LeEqU8> Div<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU8> Div<&'a i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<'a, 'b, Frac: LeEqU8> Div<&'a i8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<Frac: LeEqU8> Div<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU8> Div<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<Frac: LeEqU8> Div<i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU8> Div<i8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the / operator.

impl<'a, Frac: LeEqU8> DivAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac: LeEqU8> DivAssign<&'a i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> DivAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> DivAssign<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Eq for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Fixed for FixedI8<Frac>[src]

type Bits = i8

The primitive integer underlying type.

type Bytes = [u8; 1]

A byte array with the same size as the type.

type Frac = Frac

The number of fractional bits. Read more

impl<Frac: LeEqU8> FixedOptionalFeatures for FixedI8<Frac>[src]

impl<Frac: LeEqU8> FixedSigned for FixedI8<Frac>[src]

impl<Frac: LeEqU8> From<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> From<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> From<FixedI8<Frac>> for f64[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> From<FixedI8<FracSrc>> for FixedI16<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U8: Sub<FracSrc>,
    U16: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U16, FracDst>, Output = True>, 
[src]

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: LeEqU64> From<FixedI8<FracSrc>> for FixedI64<FracDst> where
    FracSrc: IsLessOrEqual<FracDst, Output = True>,
    U8: Sub<FracSrc>,
    U64: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U64, FracDst>, Output = True>, 
[src]

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

impl From<FixedI8<UTerm>> for i8[src]

impl From<FixedI8<UTerm>> for i16[src]

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

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

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

impl From<FixedI8<UTerm>> for isize[src]

impl<FracDst: LeEqU8> From<bool> for FixedI8<FracDst> where
    U7: Sub<FracDst>,
    U1: IsLessOrEqual<Diff<U7, FracDst>, Output = True>, 
[src]

impl From<i8> for FixedI8<U0>[src]

impl<Frac: LeEqU8> FromFixed for FixedI8<Frac>[src]

impl<Frac: LeEqU8> FromStr for FixedI8<Frac>[src]

type Err = ParseFixedError

The associated error which can be returned from parsing.

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

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

impl<FracSrc: LeEqU16, FracDst: LeEqU8> LossyFrom<FixedI16<FracSrc>> for FixedI8<FracDst> where
    U16: Sub<FracSrc>,
    U8: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U8, 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: LeEqU64, FracDst: LeEqU8> LossyFrom<FixedI64<FracSrc>> for FixedI8<FracDst> where
    U64: Sub<FracSrc>,
    U8: Sub<FracDst>,
    Diff<U64, FracSrc>: IsLessOrEqual<Diff<U8, FracDst>, Output = True>, 
[src]

impl<Frac: LeEqU8> LossyFrom<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> LossyFrom<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> LossyFrom<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> LossyFrom<FixedI8<Frac>> for f64[src]

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

impl<FracSrc: LeEqU8, FracDst: LeEqU16> LossyFrom<FixedI8<FracSrc>> for FixedI16<FracDst> where
    U8: Sub<FracSrc>,
    U16: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U16, FracDst>, Output = True>, 
[src]

impl<FracSrc: LeEqU8> LossyFrom<FixedI8<FracSrc>> for isize where
    U8: Sub<FracSrc>,
    Diff<U8, FracSrc>: IsLessOrEqual<U16, Output = True>, 
[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: LeEqU64> LossyFrom<FixedI8<FracSrc>> for FixedI64<FracDst> where
    U8: Sub<FracSrc>,
    U64: Sub<FracDst>,
    Diff<U8, FracSrc>: IsLessOrEqual<Diff<U64, FracDst>, Output = True>, 
[src]

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

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

impl<FracSrc: LeEqU8> LossyFrom<FixedI8<FracSrc>> for i16 where
    U8: Sub<FracSrc>,
    Diff<U8, FracSrc>: IsLessOrEqual<U16, Output = True>, 
[src]

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

impl<FracSrc: LeEqU8> LossyFrom<FixedI8<FracSrc>> for i64 where
    U8: Sub<FracSrc>,
    Diff<U8, FracSrc>: IsLessOrEqual<U64, Output = True>, 
[src]

impl<FracSrc: LeEqU8> LossyFrom<FixedI8<FracSrc>> for i128 where
    U8: Sub<FracSrc>,
    Diff<U8, FracSrc>: IsLessOrEqual<U128, Output = True>, 
[src]

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

impl<FracSrc: LeEqU16, FracDst: LeEqU8> LossyFrom<FixedU16<FracSrc>> for FixedI8<FracDst> where
    U16: Sub<FracSrc>,
    U7: Sub<FracDst>,
    Diff<U16, FracSrc>: IsLessOrEqual<Diff<U7, FracDst>, Output = True>, 
[src]

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

impl<FracSrc: LeEqU64, FracDst: LeEqU8> LossyFrom<FixedU64<FracSrc>> for FixedI8<FracDst> where
    U64: Sub<FracSrc>,
    U7: Sub<FracDst>,
    Diff<U64, FracSrc>: IsLessOrEqual<Diff<U7, FracDst>, Output = True>, 
[src]

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

impl<FracDst: LeEqU8> LossyFrom<bool> for FixedI8<FracDst> where
    U7: Sub<FracDst>,
    U1: IsLessOrEqual<Diff<U7, FracDst>, Output = True>, 
[src]

impl LossyFrom<i8> for FixedI8<U0>[src]

impl<Frac: LeEqU8> LowerHex for FixedI8<Frac>[src]

impl<'a, Frac: LeEqU8> Mul<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU8> Mul<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU8> Mul<&'a FixedI8<Frac>> for i8[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU8> Mul<&'a FixedI8<Frac>> for &'b i8[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU8> Mul<&'a i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, 'b, Frac: LeEqU8> Mul<&'a i8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU8> Mul<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU8> Mul<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU8> Mul<FixedI8<Frac>> for i8[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU8> Mul<FixedI8<Frac>> for &'a i8[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<Frac: LeEqU8> Mul<i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU8> Mul<i8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the * operator.

impl<'a, Frac: LeEqU8> MulAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac: LeEqU8> MulAssign<&'a i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> MulAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> MulAssign<i8> for FixedI8<Frac>[src]

impl<Frac> Neg for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the - operator.

impl<'a, Frac> Neg for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the - operator.

impl<Frac> Not for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the ! operator.

impl<'a, Frac> Not for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the ! operator.

impl<Frac: LeEqU8> Octal for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Ord for FixedI8<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> OverflowingCast<FixedI128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> OverflowingCast<FixedI16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> OverflowingCast<FixedI32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> OverflowingCast<FixedI64<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for bool[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for u64[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for u32[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedI16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedI32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedI64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedI128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedU8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedU16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedU32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedU64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> OverflowingCast<FixedI8<FracDst>> for FixedU128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> OverflowingCast<FixedU128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> OverflowingCast<FixedU16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> OverflowingCast<FixedU32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> OverflowingCast<FixedU64<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> OverflowingCast<FixedU8<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> OverflowingCast<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> OverflowingCast<usize> for FixedI8<Frac>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU16> PartialEq<FixedI16<FracRhs>> for FixedI8<FracLhs>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU64> PartialEq<FixedI64<FracRhs>> for FixedI8<FracLhs>[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for u32[src]

impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for u64[src]

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

impl<FracLhs: LeEqU16, FracRhs: LeEqU8> PartialEq<FixedI8<FracRhs>> for FixedI16<FracLhs>[src]

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

impl<FracLhs: LeEqU64, FracRhs: LeEqU8> PartialEq<FixedI8<FracRhs>> for FixedI64<FracLhs>[src]

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

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

impl<FracLhs: LeEqU16, FracRhs: LeEqU8> PartialEq<FixedI8<FracRhs>> for FixedU16<FracLhs>[src]

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

impl<FracLhs: LeEqU64, FracRhs: LeEqU8> PartialEq<FixedI8<FracRhs>> for FixedU64<FracLhs>[src]

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

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU16> PartialEq<FixedU16<FracRhs>> for FixedI8<FracLhs>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU64> PartialEq<FixedU64<FracRhs>> for FixedI8<FracLhs>[src]

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

impl<Frac: LeEqU8> PartialEq<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialEq<usize> for FixedI8<Frac>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU16> PartialOrd<FixedI16<FracRhs>> for FixedI8<FracLhs>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU64> PartialOrd<FixedI64<FracRhs>> for FixedI8<FracLhs>[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for u32[src]

impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for u64[src]

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

impl<FracLhs: LeEqU16, FracRhs: LeEqU8> PartialOrd<FixedI8<FracRhs>> for FixedI16<FracLhs>[src]

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

impl<FracLhs: LeEqU64, FracRhs: LeEqU8> PartialOrd<FixedI8<FracRhs>> for FixedI64<FracLhs>[src]

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

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

impl<FracLhs: LeEqU16, FracRhs: LeEqU8> PartialOrd<FixedI8<FracRhs>> for FixedU16<FracLhs>[src]

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

impl<FracLhs: LeEqU64, FracRhs: LeEqU8> PartialOrd<FixedI8<FracRhs>> for FixedU64<FracLhs>[src]

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

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU16> PartialOrd<FixedU16<FracRhs>> for FixedI8<FracLhs>[src]

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

impl<FracLhs: LeEqU8, FracRhs: LeEqU64> PartialOrd<FixedU64<FracRhs>> for FixedI8<FracLhs>[src]

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

impl<Frac: LeEqU8> PartialOrd<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> PartialOrd<usize> for FixedI8<Frac>[src]

impl<'a, Frac: 'a + LeEqU8> Product<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Product<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac> Rem<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<'a, 'b, Frac> Rem<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<'a, Frac: LeEqU8> Rem<&'a i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<'a, 'b, Frac: LeEqU8> Rem<&'a i8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<Frac> Rem<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<'a, Frac> Rem<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<Frac: LeEqU8> Rem<i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<'a, Frac: LeEqU8> Rem<i8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the % operator.

impl<'a, Frac> RemAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac: LeEqU8> RemAssign<&'a i8> for FixedI8<Frac>[src]

impl<Frac> RemAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> RemAssign<i8> for FixedI8<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> SaturatingCast<FixedI128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> SaturatingCast<FixedI16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> SaturatingCast<FixedI32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> SaturatingCast<FixedI64<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for bool[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for u64[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for u32[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedI16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedI32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedI64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedI128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedU8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedU16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedU32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedU64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> SaturatingCast<FixedI8<FracDst>> for FixedU128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> SaturatingCast<FixedU128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> SaturatingCast<FixedU16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> SaturatingCast<FixedU32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> SaturatingCast<FixedU64<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> SaturatingCast<FixedU8<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> SaturatingCast<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> SaturatingCast<usize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> Serialize for FixedI8<Frac>[src]

impl<'a, Frac> Shl<&'a i128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a i128> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a i16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a i16> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a i32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a i32> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a i64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a i64> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a i8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a isize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a isize> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a u128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a u128> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a u16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a u16> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a u32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a u32> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a u64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a u64> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a u8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a u8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<&'a usize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, 'b, Frac> Shl<&'a usize> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<i128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<i128> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<i16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<i16> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<i32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<i32> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<i64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<i64> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<i8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<isize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<isize> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<u128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<u128> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<u16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<u16> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<u32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<u32> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<u64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<u64> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<u8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<u8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<Frac> Shl<usize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> Shl<usize> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the << operator.

impl<'a, Frac> ShlAssign<&'a i128> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a i16> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a i32> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a i64> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a i8> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a isize> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a u128> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a u16> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a u32> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a u64> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a u8> for FixedI8<Frac>[src]

impl<'a, Frac> ShlAssign<&'a usize> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<i128> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<i16> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<i32> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<i64> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<i8> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<isize> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<u128> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<u16> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<u32> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<u64> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<u8> for FixedI8<Frac>[src]

impl<Frac> ShlAssign<usize> for FixedI8<Frac>[src]

impl<'a, Frac> Shr<&'a i128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a i128> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a i16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a i16> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a i32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a i32> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a i64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a i64> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a i8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a isize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a isize> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a u128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a u128> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a u16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a u16> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a u32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a u32> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a u64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a u64> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a u8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a u8> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<&'a usize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, 'b, Frac> Shr<&'a usize> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<i128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<i128> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<i16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<i16> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<i32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<i32> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<i64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<i64> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<i8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<i8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<isize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<isize> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<u128> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<u128> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<u16> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<u16> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<u32> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<u32> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<u64> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<u64> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<u8> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<u8> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<Frac> Shr<usize> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> Shr<usize> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the >> operator.

impl<'a, Frac> ShrAssign<&'a i128> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a i16> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a i32> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a i64> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a i8> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a isize> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a u128> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a u16> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a u32> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a u64> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a u8> for FixedI8<Frac>[src]

impl<'a, Frac> ShrAssign<&'a usize> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<i128> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<i16> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<i32> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<i64> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<i8> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<isize> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<u128> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<u16> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<u32> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<u64> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<u8> for FixedI8<Frac>[src]

impl<Frac> ShrAssign<usize> for FixedI8<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> StaticCast<FixedI128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> StaticCast<FixedI16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> StaticCast<FixedI32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> StaticCast<FixedI64<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for bool[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for u32[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for u64[src]

impl<Frac: LeEqU8> StaticCast<FixedI8<Frac>> for i128[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedU8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedI16<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedU16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedI32<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedU32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedI64<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedU64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedI128<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> StaticCast<FixedI8<FracDst>> for FixedU128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> StaticCast<FixedU128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> StaticCast<FixedU16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> StaticCast<FixedU32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> StaticCast<FixedU64<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> StaticCast<FixedU8<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> StaticCast<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> StaticCast<usize> for FixedI8<Frac>[src]

impl<'a, Frac> Sub<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the - operator.

impl<'a, 'b, Frac> Sub<&'a FixedI8<Frac>> for &'b FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the - operator.

impl<Frac> Sub<FixedI8<Frac>> for FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the - operator.

impl<'a, Frac> Sub<FixedI8<Frac>> for &'a FixedI8<Frac>[src]

type Output = FixedI8<Frac>

The resulting type after applying the - operator.

impl<'a, Frac> SubAssign<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac> SubAssign<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<'a, Frac: 'a> Sum<&'a FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac> Sum<FixedI8<Frac>> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> ToFixed for FixedI8<Frac>[src]

impl<Frac: LeEqU8> UpperHex for FixedI8<Frac>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> WrappingCast<FixedI128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> WrappingCast<FixedI16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> WrappingCast<FixedI32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> WrappingCast<FixedI64<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for bool[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for i8[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for u64[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for u128[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for usize[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for f32[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for f64[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for f16[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for bf16[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for i16[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for i32[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for i64[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for i128[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for isize[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for u8[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for u16[src]

impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for u32[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedI16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedI32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedI64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedI128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedU8<FracSrc>[src]

impl<FracSrc: LeEqU16, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedU16<FracSrc>[src]

impl<FracSrc: LeEqU32, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedU32<FracSrc>[src]

impl<FracSrc: LeEqU64, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedU64<FracSrc>[src]

impl<FracSrc: LeEqU128, FracDst: LeEqU8> WrappingCast<FixedI8<FracDst>> for FixedU128<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU128> WrappingCast<FixedU128<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU16> WrappingCast<FixedU16<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU32> WrappingCast<FixedU32<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU64> WrappingCast<FixedU64<FracDst>> for FixedI8<FracSrc>[src]

impl<FracSrc: LeEqU8, FracDst: LeEqU8> WrappingCast<FixedU8<FracDst>> for FixedI8<FracSrc>[src]

impl<Frac: LeEqU8> WrappingCast<bf16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<f16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<f32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<f64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<i128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<i16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<i32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<i64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<i8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<isize> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<u128> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<u16> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<u32> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<u64> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<u8> for FixedI8<Frac>[src]

impl<Frac: LeEqU8> WrappingCast<usize> for FixedI8<Frac>[src]

Auto Trait Implementations

impl<Frac> RefUnwindSafe for FixedI8<Frac> where
    Frac: RefUnwindSafe

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

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

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

impl<Frac> UnwindSafe for FixedI8<Frac> where
    Frac: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Az for T[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedAs for T[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T> OverflowingAs for T[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> SaturatingAs for T[src]

impl<T> StaticAs for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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> 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> WrappingAs for T[src]