#[repr(transparent)]pub struct Wrapping<F>(pub F);
Expand description
Provides intentionally wrapped arithmetic on fixed-point numbers.
The underlying value can be retrieved through the .0
index.
§Examples
use fixed::{types::I16F16, Wrapping};
let max = Wrapping(I16F16::MAX);
let delta = Wrapping(I16F16::DELTA);
assert_eq!(I16F16::MIN, (max + delta).0);
Tuple Fields§
§0: F
Implementations§
source§impl<F: Fixed> Wrapping<F>
impl<F: Fixed> Wrapping<F>
sourcepub const FRAC_NBITS: u32 = F::FRAC_NBITS
pub const FRAC_NBITS: u32 = F::FRAC_NBITS
The number of fractional bits.
See also FixedI32::FRAC_NBITS
and
FixedU32::FRAC_NBITS
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert_eq!(Wrapping::<I16F16>::FRAC_NBITS, I16F16::FRAC_NBITS);
sourcepub fn from_be(w: Self) -> Self
pub fn from_be(w: Self) -> Self
Converts a fixed-point number from big endian to the target’s endianness.
See also FixedI32::from_be
and
FixedU32::from_be
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x1234_5678));
if cfg!(target_endian = "big") {
assert_eq!(Wrapping::from_be(w), w);
} else {
assert_eq!(Wrapping::from_be(w), w.swap_bytes());
}
sourcepub fn from_le(w: Self) -> Self
pub fn from_le(w: Self) -> Self
Converts a fixed-point number from little endian to the target’s endianness.
See also FixedI32::from_le
and
FixedU32::from_le
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x1234_5678));
if cfg!(target_endian = "little") {
assert_eq!(Wrapping::from_le(w), w);
} else {
assert_eq!(Wrapping::from_le(w), w.swap_bytes());
}
sourcepub fn to_be(self) -> Self
pub fn to_be(self) -> Self
Converts self
to big endian from the target’s endianness.
See also FixedI32::to_be
and
FixedU32::to_be
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x1234_5678));
if cfg!(target_endian = "big") {
assert_eq!(w.to_be(), w);
} else {
assert_eq!(w.to_be(), w.swap_bytes());
}
sourcepub fn to_le(self) -> Self
pub fn to_le(self) -> Self
Converts self
to little endian from the target’s endianness.
See also FixedI32::to_le
and
FixedU32::to_le
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x1234_5678));
if cfg!(target_endian = "little") {
assert_eq!(w.to_le(), w);
} else {
assert_eq!(w.to_le(), w.swap_bytes());
}
sourcepub fn swap_bytes(self) -> Self
pub fn swap_bytes(self) -> Self
Reverses the byte order of the fixed-point number.
See also FixedI32::swap_bytes
and
FixedU32::swap_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x1234_5678));
let swapped = Wrapping(I16F16::from_bits(0x7856_3412));
assert_eq!(w.swap_bytes(), swapped);
sourcepub fn from_be_bytes(bytes: F::Bytes) -> Self
pub fn from_be_bytes(bytes: F::Bytes) -> Self
Creates a fixed-point number from its representation as a byte array in big endian.
See also
FixedI32::from_be_bytes
and
FixedU32::from_be_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
let bytes = [0x12, 0x34, 0x56, 0x78];
assert_eq!(
Wrapping::<I16F16>::from_be_bytes(bytes),
Wrapping::<I16F16>::from_bits(0x1234_5678)
);
sourcepub fn from_le_bytes(bytes: F::Bytes) -> Self
pub fn from_le_bytes(bytes: F::Bytes) -> Self
Creates a fixed-point number from its representation as a byte array in little endian.
See also
FixedI32::from_le_bytes
and
FixedU32::from_le_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
let bytes = [0x78, 0x56, 0x34, 0x12];
assert_eq!(
Wrapping::<I16F16>::from_le_bytes(bytes),
Wrapping::<I16F16>::from_bits(0x1234_5678)
);
sourcepub fn from_ne_bytes(bytes: F::Bytes) -> Self
pub fn from_ne_bytes(bytes: F::Bytes) -> Self
Creates a fixed-point number from its representation as a byte array in native endian.
See also
FixedI32::from_ne_bytes
and
FixedU32::from_ne_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
let bytes = if cfg!(target_endian = "big") {
[0x12, 0x34, 0x56, 0x78]
} else {
[0x78, 0x56, 0x34, 0x12]
};
assert_eq!(
Wrapping::<I16F16>::from_ne_bytes(bytes),
Wrapping::<I16F16>::from_bits(0x1234_5678)
);
sourcepub fn to_be_bytes(self) -> F::Bytes
pub fn to_be_bytes(self) -> F::Bytes
Returns the memory representation of this fixed-point number as a byte array in big-endian byte order.
See also FixedI32::to_be_bytes
and FixedU32::to_be_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert_eq!(
Wrapping::<I16F16>::from_bits(0x1234_5678).to_be_bytes(),
[0x12, 0x34, 0x56, 0x78]
);
sourcepub fn to_le_bytes(self) -> F::Bytes
pub fn to_le_bytes(self) -> F::Bytes
Returns the memory representation of this fixed-point number as a byte array in little-endian byte order.
See also FixedI32::to_le_bytes
and FixedU32::to_le_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert_eq!(
Wrapping::<I16F16>::from_bits(0x1234_5678).to_le_bytes(),
[0x78, 0x56, 0x34, 0x12]
);
sourcepub fn to_ne_bytes(self) -> F::Bytes
pub fn to_ne_bytes(self) -> F::Bytes
Returns the memory representation of this fixed-point number as a byte array in native-endian byte order.
See also FixedI32::to_ne_bytes
and FixedU32::to_ne_bytes
.
§Examples
use fixed::{types::I16F16, Wrapping};
let bytes = if cfg!(target_endian = "big") {
[0x12, 0x34, 0x56, 0x78]
} else {
[0x78, 0x56, 0x34, 0x12]
};
assert_eq!(
Wrapping::<I16F16>::from_bits(0x1234_5678).to_ne_bytes(),
bytes
);
sourcepub fn from_num<Src: ToFixed>(src: Src) -> Wrapping<F>
pub fn from_num<Src: ToFixed>(src: Src) -> Wrapping<F>
Wrapping conversion from another number.
The other number can be:
- A fixed-point number. Any extra fractional bits are discarded, which rounds towards −∞.
- An integer of type
i8
,i16
,i32
,i64
,i128
,isize
,u8
,u16
,u32
,u64
,u128
, orusize
. - A floating-point number of type
half::f16
,half::bf16
,f32
,f64
orF128
. For this conversion, the method rounds to the nearest, with ties rounding to even. - Any other number
src
for whichToFixed
is implemented, in which case this method returnsWrapping(src.wrapping_to_fixed())
.
See also
FixedI32::wrapping_from_num
and
FixedU32::wrapping_from_num
.
§Panics
For floating-point numbers, panics if the value is not finite.
§Examples
use fixed::{
types::{I4F4, I16F16},
Wrapping,
};
// 0x1234.5678 wraps into 0x4.5
let src = I16F16::from_bits(0x1234_5678);
let dst = Wrapping::<I4F4>::from_num(src);
assert_eq!(dst, Wrapping(I4F4::from_bits(0x45)));
// 0x1234 wraps into 0x4.0
let src_int = 0x1234_i32;
let dst_int = Wrapping::<I4F4>::from_num(src_int);
assert_eq!(dst_int, Wrapping(I4F4::from_bits(0x40)));
// 129.75 wrapped into 1.75 (binary 1.1100)
let src_float = 129.75;
let dst_float = Wrapping::<I4F4>::from_num(src_float);
assert_eq!(dst_float, Wrapping(I4F4::from_bits(0b11100)));
sourcepub fn to_num<Dst: FromFixed>(self) -> Dst
pub fn to_num<Dst: FromFixed>(self) -> Dst
Converts a fixed-point number to another number, wrapping the value on overflow.
The other number can be:
- Another fixed-point number. Any extra fractional bits are discarded, which rounds towards −∞.
- An integer of type
i8
,i16
,i32
,i64
,i128
,isize
,u8
,u16
,u32
,u64
,u128
, orusize
. Any fractional bits are discarded, which rounds towards −∞. - A floating-point number of type
half::f16
,half::bf16
,f32
,f64
orF128
. For this conversion, the method rounds to the nearest, with ties rounding to even. - Any other type
Dst
for whichFromFixed
is implemented, in which case this method returnsDst::wrapping_from_fixed(self.0)
.
See also FixedI32::wrapping_to_num
and
FixedU32::wrapping_to_num
.
§Examples
use fixed::{
types::{I16F16, I2F6, I4F4},
Wrapping,
};
// conversion that fits
let src = Wrapping(I4F4::from_num(1.75));
let expected = I16F16::from_num(1.75);
assert_eq!(src.to_num::<I16F16>(), expected);
// conversion that wraps
let src = Wrapping(I4F4::MAX);
let wrapped = I2F6::from_bits(I2F6::MAX.to_bits() << 2);
assert_eq!(src.to_num::<I2F6>(), wrapped);
sourcepub fn from_str_binary(src: &str) -> Result<Wrapping<F>, ParseFixedError>
pub fn from_str_binary(src: &str) -> Result<Wrapping<F>, ParseFixedError>
Parses a string slice containing binary digits to return a fixed-point number.
Rounding is to the nearest, with ties rounded to even.
See also
FixedI32::wrapping_from_str_binary
and
FixedU32::wrapping_from_str_binary
.
§Examples
use fixed::{types::I8F8, Wrapping};
let check = Wrapping(I8F8::from_bits(0b1110001 << (8 - 1)));
assert_eq!(Wrapping::<I8F8>::from_str_binary("101100111000.1"), Ok(check));
sourcepub fn from_str_octal(src: &str) -> Result<Wrapping<F>, ParseFixedError>
pub fn from_str_octal(src: &str) -> Result<Wrapping<F>, ParseFixedError>
Parses a string slice containing octal digits to return a fixed-point number.
Rounding is to the nearest, with ties rounded to even.
See also
FixedI32::wrapping_from_str_octal
and
FixedU32::wrapping_from_str_octal
.
§Examples
use fixed::{types::I8F8, Wrapping};
let check = Wrapping(I8F8::from_bits(0o1654 << (8 - 3)));
assert_eq!(Wrapping::<I8F8>::from_str_octal("7165.4"), Ok(check));
sourcepub fn from_str_hex(src: &str) -> Result<Wrapping<F>, ParseFixedError>
pub fn from_str_hex(src: &str) -> Result<Wrapping<F>, ParseFixedError>
Parses a string slice containing hexadecimal digits to return a fixed-point number.
Rounding is to the nearest, with ties rounded to even.
See also
FixedI32::wrapping_from_str_hex
and
FixedU32::wrapping_from_str_hex
.
§Examples
use fixed::{types::I8F8, Wrapping};
let check = Wrapping(I8F8::from_bits(0xFFE));
assert_eq!(Wrapping::<I8F8>::from_str_hex("C0F.FE"), Ok(check));
sourcepub fn int(self) -> Wrapping<F>
pub fn int(self) -> Wrapping<F>
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, for example for the type
Wrapping<I0F16>
, where the return value
is always zero.
See also FixedI32::int
and
FixedU32::int
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert_eq!(Wrapping(I16F16::from_num(12.25)).int(), Wrapping(I16F16::from_num(12)));
assert_eq!(Wrapping(I16F16::from_num(-12.25)).int(), Wrapping(I16F16::from_num(-13)));
sourcepub fn frac(self) -> Wrapping<F>
pub fn frac(self) -> Wrapping<F>
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,
for example for the type
Wrapping<I0F16>
,
where the return value is always equal to self
.
See also FixedI32::frac
and
FixedU32::frac
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert_eq!(Wrapping(I16F16::from_num(12.25)).frac(), Wrapping(I16F16::from_num(0.25)));
assert_eq!(Wrapping(I16F16::from_num(-12.25)).frac(), Wrapping(I16F16::from_num(0.75)));
sourcepub fn round_to_zero(self) -> Wrapping<F>
pub fn round_to_zero(self) -> Wrapping<F>
Rounds to the next integer towards 0.
See also
FixedI32::round_to_zero
and
FixedU32::round_to_zero
.
§Examples
use fixed::{types::I16F16, Wrapping};
let three = Wrapping(I16F16::from_num(3));
assert_eq!(Wrapping(I16F16::from_num(3.9)).round_to_zero(), three);
assert_eq!(Wrapping(I16F16::from_num(-3.9)).round_to_zero(), -three);
sourcepub fn ceil(self) -> Wrapping<F>
pub fn ceil(self) -> Wrapping<F>
Wrapping ceil. Rounds to the next integer towards +∞, wrapping on overflow.
See also
FixedI32::wrapping_ceil
and
FixedU32::wrapping_ceil
.
§Examples
use fixed::{types::I16F16, Wrapping};
let two_half = Wrapping(I16F16::from_num(5) / 2);
assert_eq!(two_half.ceil(), Wrapping(I16F16::from_num(3)));
assert_eq!(Wrapping(I16F16::MAX).ceil(), Wrapping(I16F16::MIN));
sourcepub fn floor(self) -> Wrapping<F>
pub fn floor(self) -> Wrapping<F>
Wrapping floor. Rounds to the next integer towards −∞, wrapping on overflow.
Overflow can only occur for signed numbers with zero integer bits.
See also
FixedI32::wrapping_floor
and
FixedU32::wrapping_floor
.
§Examples
use fixed::{
types::{I0F32, I16F16},
Wrapping,
};
let two_half = Wrapping(I16F16::from_num(5) / 2);
assert_eq!(two_half.floor(), Wrapping(I16F16::from_num(2)));
assert_eq!(Wrapping(I0F32::MIN).floor(), Wrapping(I0F32::ZERO));
sourcepub fn round(self) -> Wrapping<F>
pub fn round(self) -> Wrapping<F>
Wrapping round. Rounds to the next integer to the nearest, with ties rounded away from zero, and wrapping on overflow.
See also
FixedI32::wrapping_round
and
FixedU32::wrapping_round
.
§Examples
use fixed::{types::I16F16, Wrapping};
let two_half = Wrapping(I16F16::from_num(5) / 2);
assert_eq!(two_half.round(), Wrapping(I16F16::from_num(3)));
assert_eq!((-two_half).round(), Wrapping(I16F16::from_num(-3)));
assert_eq!(Wrapping(I16F16::MAX).round(), Wrapping(I16F16::MIN));
sourcepub fn round_ties_even(self) -> Wrapping<F>
pub fn round_ties_even(self) -> Wrapping<F>
Wrapping round. Rounds to the next integer to the nearest, with ties rounded to even, and wrapping on overflow.
See also
FixedI32::wrapping_round_ties_even
and
FixedU32::wrapping_round_ties_even
.
§Examples
use fixed::{types::I16F16, Wrapping};
let two_half = Wrapping(I16F16::from_num(2.5));
assert_eq!(two_half.round_ties_even(), Wrapping(I16F16::from_num(2)));
let three_half = Wrapping(I16F16::from_num(3.5));
assert_eq!(three_half.round_ties_even(), Wrapping(I16F16::from_num(4)));
let max = Wrapping(I16F16::MAX);
assert_eq!(max.round_ties_even(), Wrapping(I16F16::MIN));
sourcepub fn count_ones(self) -> u32
pub fn count_ones(self) -> u32
Returns the number of ones in the binary representation.
See also FixedI32::count_ones
and
FixedU32::count_ones
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x00FF_FF00));
assert_eq!(w.count_ones(), w.0.count_ones());
sourcepub fn count_zeros(self) -> u32
pub fn count_zeros(self) -> u32
Returns the number of zeros in the binary representation.
See also FixedI32::count_zeros
and FixedU32::count_zeros
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x00FF_FF00));
assert_eq!(w.count_zeros(), w.0.count_zeros());
sourcepub fn leading_ones(self) -> u32
pub fn leading_ones(self) -> u32
Returns the number of leading ones in the binary representation.
See also FixedI32::leading_ones
and FixedU32::leading_ones
.
§Examples
use fixed::{types::U16F16, Wrapping};
let w = Wrapping(U16F16::from_bits(0xFF00_00FF));
assert_eq!(w.leading_ones(), w.0.leading_ones());
sourcepub fn leading_zeros(self) -> u32
pub fn leading_zeros(self) -> u32
Returns the number of leading zeros in the binary representation.
See also
FixedI32::leading_zeros
and
FixedU32::leading_zeros
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x00FF_FF00));
assert_eq!(w.leading_zeros(), w.0.leading_zeros());
sourcepub fn trailing_ones(self) -> u32
pub fn trailing_ones(self) -> u32
Returns the number of trailing ones in the binary representation.
See also
FixedI32::trailing_ones
and
FixedU32::trailing_ones
.
§Examples
use fixed::{types::U16F16, Wrapping};
let w = Wrapping(U16F16::from_bits(0xFF00_00FF));
assert_eq!(w.trailing_ones(), w.0.trailing_ones());
sourcepub fn trailing_zeros(self) -> u32
pub fn trailing_zeros(self) -> u32
Returns the number of trailing zeros in the binary representation.
See also
FixedI32::trailing_zeros
and
FixedU32::trailing_zeros
.
§Examples
use fixed::{types::I16F16, Wrapping};
let w = Wrapping(I16F16::from_bits(0x00FF_FF00));
assert_eq!(w.trailing_zeros(), w.0.trailing_zeros());
sourcepub fn sqrt(self) -> Self
pub fn sqrt(self) -> Self
Returns the square root.
See also
FixedI32::wrapping_sqrt
and
FixedU32::wrapping_sqrt
.
§Panics
Panics if the number is negative.
§Examples
use fixed::{types::I0F32, Wrapping};
assert_eq!(Wrapping(I0F32::lit("0b0.0001")).sqrt().0, I0F32::lit("0b0.01"));
// This method handles the overflow corner case.
let w = Wrapping(I0F32::from_num(0.25));
assert_eq!(w.sqrt().0, -0.5);
sourcepub fn reverse_bits(self) -> Wrapping<F>
pub fn reverse_bits(self) -> Wrapping<F>
Reverses the order of the bits of the fixed-point number.
See also FixedI32::reverse_bits
and FixedU32::reverse_bits
.
§Examples
use fixed::{types::I16F16, Wrapping};
let i = I16F16::from_bits(0x1234_5678);
assert_eq!(Wrapping(i).reverse_bits(), Wrapping(i.reverse_bits()));
sourcepub fn rotate_left(self, n: u32) -> Wrapping<F>
pub fn rotate_left(self, n: u32) -> Wrapping<F>
Shifts to the left by n
bits, wrapping the truncated bits to the right end.
See also FixedI32::rotate_left
and FixedU32::rotate_left
.
§Examples
use fixed::{types::I16F16, Wrapping};
let i = I16F16::from_bits(0x00FF_FF00);
assert_eq!(Wrapping(i).rotate_left(12), Wrapping(i.rotate_left(12)));
sourcepub fn rotate_right(self, n: u32) -> Wrapping<F>
pub fn rotate_right(self, n: u32) -> Wrapping<F>
Shifts to the right by n
bits, wrapping the truncated bits to the left end.
See also FixedI32::rotate_right
and FixedU32::rotate_right
.
§Examples
use fixed::{types::I16F16, Wrapping};
let i = I16F16::from_bits(0x00FF_FF00);
assert_eq!(Wrapping(i).rotate_right(12), Wrapping(i.rotate_right(12)));
sourcepub fn dist(self, other: Wrapping<F>) -> Wrapping<F>
pub fn dist(self, other: Wrapping<F>) -> Wrapping<F>
Returns the distance from self
to other
.
See also
FixedI32::wrapping_dist
and
FixedU32::wrapping_dist
.
§Examples
use fixed::{types::I16F16, Wrapping};
type Wr = Wrapping<I16F16>;
assert_eq!(Wr::from_num(-1).dist(Wr::from_num(4)), Wr::from_num(5));
assert_eq!(Wr::MIN.dist(Wr::MAX), -Wr::DELTA);
sourcepub fn mean(self, other: Wrapping<F>) -> Wrapping<F>
pub fn mean(self, other: Wrapping<F>) -> Wrapping<F>
Returns the mean of self
and other
.
See also FixedI32::mean
and
FixedU32::mean
.
§Examples
use fixed::{types::I16F16, Wrapping};
let three = Wrapping(I16F16::from_num(3));
let four = Wrapping(I16F16::from_num(4));
assert_eq!(three.mean(four), Wrapping(I16F16::from_num(3.5)));
assert_eq!(three.mean(-four), Wrapping(I16F16::from_num(-0.5)));
sourcepub fn hypot(self, other: Wrapping<F>) -> Wrapping<F>
pub fn hypot(self, other: Wrapping<F>) -> Wrapping<F>
Compute the hypotenuse of a right triange.
See also
FixedI32::wrapping_hypot
and
FixedU32::wrapping_hypot
.
§Examples
use fixed::{types::I8F8, Wrapping};
type Wr = Wrapping<I8F8>;
// hypot(3, 4) == 5
assert_eq!(Wr::from_num(3).hypot(Wr::from_num(4)), Wr::from_num(5));
// hypot(88, 105) == 137, which wraps to -119
assert_eq!(Wr::from_num(88).hypot(Wr::from_num(105)), Wr::from_num(-119));
sourcepub fn recip(self) -> Wrapping<F>
pub fn recip(self) -> Wrapping<F>
Returns the reciprocal (inverse), 1/self
.
See also
FixedI32::wrapping_recip
and
FixedU32::wrapping_recip
.
§Panics
Panics if self
is zero.
§Examples
use fixed::{types::I8F24, Wrapping};
let quarter = Wrapping(I8F24::from_num(0.25));
let frac_1_512 = Wrapping(I8F24::ONE / 512);
assert_eq!(quarter.recip(), Wrapping(I8F24::from_num(4)));
assert_eq!(frac_1_512.recip(), Wrapping(I8F24::ZERO));
sourcepub fn next_multiple_of(self, other: Wrapping<F>) -> Wrapping<F>
pub fn next_multiple_of(self, other: Wrapping<F>) -> Wrapping<F>
Returns the next multiple of other
.
See also
FixedI32::wrapping_next_multiple_of
and
FixedU32::wrapping_next_multiple_of
.
§Panics
Panics if other
is zero.
§Examples
use fixed::{types::I16F16, Wrapping};
let one_point_5 = Wrapping::<I16F16>::from_num(1.5);
let four = Wrapping::<I16F16>::from_num(4);
let four_point_5 = Wrapping::<I16F16>::from_num(4.5);
assert_eq!(four.next_multiple_of(one_point_5), four_point_5);
let max = Wrapping::<I16F16>::MAX;
let max_minus_delta = max - Wrapping::<I16F16>::DELTA;
assert_eq!(max.next_multiple_of(max_minus_delta), max_minus_delta * 2);
sourcepub fn mul_add(self, mul: Wrapping<F>, add: Wrapping<F>) -> Wrapping<F>
pub fn mul_add(self, mul: Wrapping<F>, add: Wrapping<F>) -> Wrapping<F>
Multiply and add. Returns self
× mul
+ add
.
See also
FixedI32::wrapping_mul_add
and
FixedU32::wrapping_mul_add
.
§Examples
use fixed::{types::I16F16, Wrapping};
let half = Wrapping(I16F16::from_num(0.5));
let three = Wrapping(I16F16::from_num(3));
let four = Wrapping(I16F16::from_num(4));
let max = Wrapping(I16F16::MAX);
assert_eq!(three.mul_add(half, four), Wrapping(I16F16::from_num(5.5)));
assert_eq!(max.mul_add(three, max), max * 4);
sourcepub fn add_prod(self, a: Wrapping<F>, b: Wrapping<F>) -> Wrapping<F>
pub fn add_prod(self, a: Wrapping<F>, b: Wrapping<F>) -> Wrapping<F>
Adds self
to the product a
× b
.
See also
FixedI32::wrapping_add_prod
and
FixedU32::wrapping_add_prod
.
§Examples
use fixed::{types::I16F16, Wrapping};
let half = Wrapping(I16F16::from_num(0.5));
let three = Wrapping(I16F16::from_num(3));
let four = Wrapping(I16F16::from_num(4));
let max = Wrapping(I16F16::MAX);
assert_eq!(four.add_prod(three, half), Wrapping(I16F16::from_num(5.5)));
assert_eq!(max.add_prod(max, three), max * 4);
sourcepub fn mul_acc(&mut self, a: Wrapping<F>, b: Wrapping<F>)
pub fn mul_acc(&mut self, a: Wrapping<F>, b: Wrapping<F>)
Multiply and accumulate. Adds (a
× b
) to self
.
See also
FixedI32::wrapping_mul_acc
and
FixedU32::wrapping_mul_acc
.
§Examples
use fixed::{types::I16F16, Wrapping};
let mut acc = Wrapping(I16F16::from_num(3));
acc.mul_acc(Wrapping(I16F16::from_num(4)), Wrapping(I16F16::from_num(0.5)));
assert_eq!(acc, Wrapping(I16F16::from_num(5)));
acc = Wrapping(I16F16::MAX);
acc.mul_acc(Wrapping(I16F16::MAX), Wrapping(I16F16::from_num(3)));
assert_eq!(acc, Wrapping(I16F16::MAX) * 4);
sourcepub fn div_euclid(self, divisor: Wrapping<F>) -> Wrapping<F>
pub fn div_euclid(self, divisor: Wrapping<F>) -> Wrapping<F>
Euclidean division.
See also
FixedI32::wrapping_div_euclid
and
FixedU32::wrapping_div_euclid
.
§Panics
Panics if the divisor is zero.
§Examples
use fixed::{types::I16F16, Wrapping};
let num = Wrapping(I16F16::from_num(7.5));
let den = Wrapping(I16F16::from_num(2));
assert_eq!(num.div_euclid(den), Wrapping(I16F16::from_num(3)));
let quarter = Wrapping(I16F16::from_num(0.25));
let check = (Wrapping(I16F16::MAX) * 4i32).round_to_zero();
assert_eq!(Wrapping(I16F16::MAX).div_euclid(quarter), check);
sourcepub fn rem_euclid(self, divisor: Wrapping<F>) -> Wrapping<F>
pub fn rem_euclid(self, divisor: Wrapping<F>) -> Wrapping<F>
Remainder for Euclidean division.
See also FixedI32::rem_euclid
and
FixedU32::rem_euclid
.
§Panics
Panics if the divisor is zero.
§Examples
use fixed::{types::I16F16, Wrapping};
let num = Wrapping(I16F16::from_num(7.5));
let den = Wrapping(I16F16::from_num(2));
assert_eq!(num.rem_euclid(den), Wrapping(I16F16::from_num(1.5)));
assert_eq!((-num).rem_euclid(den), Wrapping(I16F16::from_num(0.5)));
sourcepub fn div_euclid_int(self, divisor: F::Bits) -> Wrapping<F>
pub fn div_euclid_int(self, divisor: F::Bits) -> Wrapping<F>
Euclidean division by an integer.
See also
FixedI32::wrapping_div_euclid_int
and
FixedU32::wrapping_div_euclid_int
.
§Panics
Panics if the divisor is zero.
§Examples
use fixed::{types::I16F16, Wrapping};
let num = Wrapping(I16F16::from_num(7.5));
assert_eq!(num.div_euclid_int(2), Wrapping(I16F16::from_num(3)));
let min = Wrapping(I16F16::MIN);
assert_eq!(min.div_euclid_int(-1), min);
sourcepub fn rem_euclid_int(self, divisor: F::Bits) -> Wrapping<F>
pub fn rem_euclid_int(self, divisor: F::Bits) -> Wrapping<F>
Remainder for Euclidean division.
See also
FixedI32::wrapping_rem_euclid_int
and
FixedU32::wrapping_rem_euclid_int
.
§Panics
Panics if the divisor is zero.
§Examples
use fixed::{types::I16F16, Wrapping};
let num = Wrapping(I16F16::from_num(7.5));
assert_eq!(num.rem_euclid_int(2), Wrapping(I16F16::from_num(1.5)));
assert_eq!((-num).rem_euclid_int(2), Wrapping(I16F16::from_num(0.5)));
sourcepub fn lerp(self, start: Wrapping<F>, end: Wrapping<F>) -> Wrapping<F>
pub fn lerp(self, start: Wrapping<F>, end: Wrapping<F>) -> Wrapping<F>
Linear interpolation between start
and end
.
See also
FixedI32::wrapping_lerp
and
FixedU32::wrapping_lerp
.
§Examples
use fixed::{types::I16F16, Wrapping};
type Wr = Wrapping<I16F16>;
assert_eq!(Wr::from_num(0.5).lerp(Wr::ZERO, Wr::MAX), Wr::MAX / 2);
assert_eq!(Wr::from_num(1.5).lerp(Wr::ZERO, Wr::MAX), Wr::MAX + Wr::MAX / 2);
sourcepub fn inv_lerp(self, start: Wrapping<F>, end: Wrapping<F>) -> Wrapping<F>
pub fn inv_lerp(self, start: Wrapping<F>, end: Wrapping<F>) -> Wrapping<F>
Inverse linear interpolation between start
and end
.
See also
FixedI32::wrapping_inv_lerp
and
FixedU32::wrapping_inv_lerp
.
§Examples
use fixed::{types::I16F16, Wrapping};
type Wr = Wrapping<I16F16>;
assert_eq!(
Wr::from_num(25).inv_lerp(Wr::from_num(20), Wr::from_num(40)),
Wr::from_num(0.25)
);
sourcepub fn round_ties_to_even(self) -> Wrapping<F>
👎Deprecated since 1.28.0: renamed to round_ties_even
pub fn round_ties_to_even(self) -> Wrapping<F>
round_ties_even
Wrapping round. Rounds to the next integer to the nearest, with ties rounded to even, and wrapping on overflow.
source§impl<F: FixedSigned> Wrapping<F>
impl<F: FixedSigned> Wrapping<F>
sourcepub fn signed_bits(self) -> u32
pub fn signed_bits(self) -> u32
Returns the number of bits required to represent the value.
The number of bits required includes an initial one for negative numbers, and an initial zero for non-negative numbers.
See also FixedI32::signed_bits
.
§Examples
use fixed::{types::I4F4, Wrapping};
assert_eq!(Wrapping(I4F4::from_num(-3)).signed_bits(), 7); // “_101.0000”
assert_eq!(Wrapping(I4F4::from_num(-1)).signed_bits(), 5); // “___1.0000”
assert_eq!(Wrapping(I4F4::from_num(-0.0625)).signed_bits(), 1); // “____.___1”
assert_eq!(Wrapping(I4F4::from_num(0)).signed_bits(), 1); // “____.___0”
assert_eq!(Wrapping(I4F4::from_num(0.0625)).signed_bits(), 2); // “____.__01”
assert_eq!(Wrapping(I4F4::from_num(1)).signed_bits(), 6); // “__01.0000”
assert_eq!(Wrapping(I4F4::from_num(3)).signed_bits(), 7); // “_011.0000”
sourcepub fn is_positive(self) -> bool
pub fn is_positive(self) -> bool
Returns true
if the number is > 0.
See also FixedI32::is_positive
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert!(Wrapping(I16F16::from_num(4.3)).is_positive());
assert!(!Wrapping(I16F16::ZERO).is_positive());
assert!(!Wrapping(I16F16::from_num(-4.3)).is_positive());
sourcepub fn is_negative(self) -> bool
pub fn is_negative(self) -> bool
Returns true
if the number is < 0.
See also FixedI32::is_negative
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert!(!Wrapping(I16F16::from_num(4.3)).is_negative());
assert!(!Wrapping(I16F16::ZERO).is_negative());
assert!(Wrapping(I16F16::from_num(-4.3)).is_negative());
sourcepub fn abs(self) -> Wrapping<F>
pub fn abs(self) -> Wrapping<F>
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.
See also FixedI32::wrapping_abs
.
§Examples
use fixed::{types::I16F16, Wrapping};
assert_eq!(Wrapping(I16F16::from_num(-5)).abs(), Wrapping(I16F16::from_num(5)));
assert_eq!(Wrapping(I16F16::MIN).abs(), Wrapping(I16F16::MIN));
sourcepub fn signum(self) -> Wrapping<F>
pub fn signum(self) -> Wrapping<F>
Returns a number representing the sign of self
.
§Warning
Using this method when 1 and −1 cannot be represented is almost certainly a bug, however, this is allowed and gives the following wrapped results.
- When there are no integer bits, for example for the type
Wrapping<I0F16>
, the return value is always zero. - When there is one integer bit, for example for the type
Wrapping<I1F15>
, the return value is zero whenself
is zero, and −1 otherwise. This means that for a positive number, −1 is returned, because +1 does not fit and is wrapped to −1.
See also
FixedI32::wrapping_signum
.
§Examples
use fixed::{
types::{I0F32, I1F31, I16F16},
Wrapping,
};
assert_eq!(Wrapping(<I16F16>::from_num(-3.9)).signum(), Wrapping(I16F16::NEG_ONE));
assert_eq!(Wrapping(<I16F16>::ZERO).signum(), Wrapping(I16F16::ZERO));
assert_eq!(Wrapping(<I16F16>::from_num(3.9)).signum(), Wrapping(I16F16::ONE));
assert_eq!(Wrapping(<I1F31>::from_num(0.5)).signum(), Wrapping(I1F31::NEG_ONE));
assert_eq!(Wrapping(<I0F32>::from_num(0.25)).signum(), Wrapping(I0F32::ZERO));
assert_eq!(Wrapping(<I0F32>::from_num(-0.5)).signum(), Wrapping(I0F32::ZERO));
sourcepub fn add_unsigned(self, rhs: F::Unsigned) -> Wrapping<F>
pub fn add_unsigned(self, rhs: F::Unsigned) -> Wrapping<F>
Addition with an unsigned fixed-point number.
See also
FixedI32::wrapping_add_unsigned
.
§Examples
use fixed::{
types::{I16F16, U16F16},
Wrapping,
};
assert_eq!(
Wrapping::<I16F16>::from_num(-5).add_unsigned(U16F16::from_num(3)),
Wrapping::<I16F16>::from_num(-2)
);
assert_eq!(
Wrapping::<I16F16>::ZERO.add_unsigned(U16F16::MAX),
-Wrapping::<I16F16>::DELTA
);
sourcepub fn sub_unsigned(self, rhs: F::Unsigned) -> Wrapping<F>
pub fn sub_unsigned(self, rhs: F::Unsigned) -> Wrapping<F>
Subtraction with an unsigned fixed-point number.
See also
FixedI32::wrapping_sub_unsigned
.
§Examples
use fixed::{
types::{I16F16, U16F16},
Wrapping,
};
assert_eq!(
Wrapping::<I16F16>::from_num(3).sub_unsigned(U16F16::from_num(5)),
Wrapping::<I16F16>::from_num(-2)
);
assert_eq!(
Wrapping::<I16F16>::ZERO.sub_unsigned(U16F16::MAX),
Wrapping::<I16F16>::DELTA
);
source§impl<F: FixedUnsigned> Wrapping<F>
impl<F: FixedUnsigned> Wrapping<F>
sourcepub fn significant_bits(self) -> u32
pub fn significant_bits(self) -> u32
Returns the number of bits required to represent the value.
See also
FixedU32::significant_bits
.
§Examples
use fixed::{types::U4F4, Wrapping};
assert_eq!(Wrapping(U4F4::from_num(0)).significant_bits(), 0); // “____.____”
assert_eq!(Wrapping(U4F4::from_num(0.0625)).significant_bits(), 1); // “____.___1”
assert_eq!(Wrapping(U4F4::from_num(1)).significant_bits(), 5); // “___1.0000”
assert_eq!(Wrapping(U4F4::from_num(3)).significant_bits(), 6); // “__11.0000”
sourcepub fn is_power_of_two(self) -> bool
pub fn is_power_of_two(self) -> bool
Returns true
if the fixed-point number is
2k for some integer k.
See also
FixedU32::is_power_of_two
.
§Examples
use fixed::{types::U16F16, Wrapping};
assert!(Wrapping(U16F16::from_num(0.5)).is_power_of_two());
assert!(Wrapping(U16F16::from_num(4)).is_power_of_two());
assert!(!Wrapping(U16F16::from_num(5)).is_power_of_two());
sourcepub fn highest_one(self) -> Wrapping<F>
pub fn highest_one(self) -> Wrapping<F>
Returns the highest one in the binary representation, or zero
if self
is zero.
If self
> 0, the highest one is equal to the largest power
of two that is ≤ self
.
See also FixedU32::highest_one
.
§Examples
use fixed::{types::U16F16, Wrapping};
type T = Wrapping<U16F16>;
assert_eq!(T::from_bits(0b11_0010).highest_one(), T::from_bits(0b10_0000));
assert_eq!(T::from_num(0.3).highest_one(), T::from_num(0.25));
assert_eq!(T::from_num(4).highest_one(), T::from_num(4));
assert_eq!(T::from_num(6.5).highest_one(), T::from_num(4));
assert_eq!(T::ZERO.highest_one(), T::ZERO);
sourcepub fn next_power_of_two(self) -> Wrapping<F>
pub fn next_power_of_two(self) -> Wrapping<F>
Returns the smallest power of two that is ≥ self
.
If the next power of two is too large to fit, it is wrapped to zero.
See also
FixedU32::wrapping_next_power_of_two
.
§Examples
use fixed::{types::U16F16, Wrapping};
type T = Wrapping<U16F16>;
assert_eq!(T::from_bits(0b11_0010).next_power_of_two(), T::from_bits(0b100_0000));
assert_eq!(T::from_num(0.3).next_power_of_two(), T::from_num(0.5));
assert_eq!(T::from_num(4).next_power_of_two(), T::from_num(4));
assert_eq!(T::from_num(6.5).next_power_of_two(), T::from_num(8));
// if the next power of two is too large, it is wrapped to zero
assert_eq!(T::MAX.next_power_of_two(), T::ZERO);
sourcepub fn add_signed(self, rhs: F::Signed) -> Wrapping<F>
pub fn add_signed(self, rhs: F::Signed) -> Wrapping<F>
Addition with an signed fixed-point number.
See also
FixedU32::wrapping_add_signed
.
§Examples
use fixed::{
types::{I16F16, U16F16},
Wrapping,
};
assert_eq!(
Wrapping::<U16F16>::from_num(5).add_signed(I16F16::from_num(-3)),
Wrapping::<U16F16>::from_num(2)
);
assert_eq!(
Wrapping::<U16F16>::ZERO.add_signed(-I16F16::DELTA),
Wrapping::<U16F16>::MAX
);
sourcepub fn sub_signed(self, rhs: F::Signed) -> Wrapping<F>
pub fn sub_signed(self, rhs: F::Signed) -> Wrapping<F>
Subtraction with an signed fixed-point number.
See also
FixedU32::wrapping_sub_signed
.
§Examples
use fixed::{
types::{I16F16, U16F16},
Wrapping,
};
assert_eq!(
Wrapping::<U16F16>::from_num(5).sub_signed(I16F16::from_num(-3)),
Wrapping::<U16F16>::from_num(8)
);
assert_eq!(
Wrapping::<U16F16>::ZERO.sub_signed(I16F16::DELTA),
Wrapping::<U16F16>::MAX
);
Trait Implementations§
source§impl<F: Fixed> AddAssign<&F> for Wrapping<F>
impl<F: Fixed> AddAssign<&F> for Wrapping<F>
source§fn add_assign(&mut self, other: &F)
fn add_assign(&mut self, other: &F)
+=
operation. Read moresource§impl<F: Fixed> AddAssign<&Wrapping<F>> for Wrapping<F>
impl<F: Fixed> AddAssign<&Wrapping<F>> for Wrapping<F>
source§fn add_assign(&mut self, other: &Wrapping<F>)
fn add_assign(&mut self, other: &Wrapping<F>)
+=
operation. Read moresource§impl<F: Fixed> AddAssign<F> for Wrapping<F>
impl<F: Fixed> AddAssign<F> for Wrapping<F>
source§fn add_assign(&mut self, other: F)
fn add_assign(&mut self, other: F)
+=
operation. Read moresource§impl<F: Fixed> AddAssign for Wrapping<F>
impl<F: Fixed> AddAssign for Wrapping<F>
source§fn add_assign(&mut self, other: Wrapping<F>)
fn add_assign(&mut self, other: Wrapping<F>)
+=
operation. Read moresource§impl<'a, Frac: LeEqU128> Arbitrary<'a> for Wrapping<FixedI128<Frac>>
impl<'a, Frac: LeEqU128> Arbitrary<'a> for Wrapping<FixedI128<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU16> Arbitrary<'a> for Wrapping<FixedI16<Frac>>
impl<'a, Frac: LeEqU16> Arbitrary<'a> for Wrapping<FixedI16<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU32> Arbitrary<'a> for Wrapping<FixedI32<Frac>>
impl<'a, Frac: LeEqU32> Arbitrary<'a> for Wrapping<FixedI32<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU64> Arbitrary<'a> for Wrapping<FixedI64<Frac>>
impl<'a, Frac: LeEqU64> Arbitrary<'a> for Wrapping<FixedI64<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU8> Arbitrary<'a> for Wrapping<FixedI8<Frac>>
impl<'a, Frac: LeEqU8> Arbitrary<'a> for Wrapping<FixedI8<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU128> Arbitrary<'a> for Wrapping<FixedU128<Frac>>
impl<'a, Frac: LeEqU128> Arbitrary<'a> for Wrapping<FixedU128<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU16> Arbitrary<'a> for Wrapping<FixedU16<Frac>>
impl<'a, Frac: LeEqU16> Arbitrary<'a> for Wrapping<FixedU16<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU32> Arbitrary<'a> for Wrapping<FixedU32<Frac>>
impl<'a, Frac: LeEqU32> Arbitrary<'a> for Wrapping<FixedU32<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU64> Arbitrary<'a> for Wrapping<FixedU64<Frac>>
impl<'a, Frac: LeEqU64> Arbitrary<'a> for Wrapping<FixedU64<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a, Frac: LeEqU8> Arbitrary<'a> for Wrapping<FixedU8<Frac>>
impl<'a, Frac: LeEqU8> Arbitrary<'a> for Wrapping<FixedU8<Frac>>
source§fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> ArbitraryResult<Self>
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl<F> BitAndAssign<&F> for Wrapping<F>where
for<'a> F: BitAndAssign<&'a F>,
impl<F> BitAndAssign<&F> for Wrapping<F>where
for<'a> F: BitAndAssign<&'a F>,
source§fn bitand_assign(&mut self, other: &F)
fn bitand_assign(&mut self, other: &F)
&=
operation. Read moresource§impl<F> BitAndAssign<&Wrapping<F>> for Wrapping<F>where
for<'a> F: BitAndAssign<&'a F>,
impl<F> BitAndAssign<&Wrapping<F>> for Wrapping<F>where
for<'a> F: BitAndAssign<&'a F>,
source§fn bitand_assign(&mut self, other: &Wrapping<F>)
fn bitand_assign(&mut self, other: &Wrapping<F>)
&=
operation. Read moresource§impl<F> BitAndAssign<F> for Wrapping<F>where
F: BitAndAssign<F>,
impl<F> BitAndAssign<F> for Wrapping<F>where
F: BitAndAssign<F>,
source§fn bitand_assign(&mut self, other: F)
fn bitand_assign(&mut self, other: F)
&=
operation. Read moresource§impl<F> BitAndAssign for Wrapping<F>where
F: BitAndAssign<F>,
impl<F> BitAndAssign for Wrapping<F>where
F: BitAndAssign<F>,
source§fn bitand_assign(&mut self, other: Wrapping<F>)
fn bitand_assign(&mut self, other: Wrapping<F>)
&=
operation. Read moresource§impl<F> BitOrAssign<&F> for Wrapping<F>where
for<'a> F: BitOrAssign<&'a F>,
impl<F> BitOrAssign<&F> for Wrapping<F>where
for<'a> F: BitOrAssign<&'a F>,
source§fn bitor_assign(&mut self, other: &F)
fn bitor_assign(&mut self, other: &F)
|=
operation. Read moresource§impl<F> BitOrAssign<&Wrapping<F>> for Wrapping<F>where
for<'a> F: BitOrAssign<&'a F>,
impl<F> BitOrAssign<&Wrapping<F>> for Wrapping<F>where
for<'a> F: BitOrAssign<&'a F>,
source§fn bitor_assign(&mut self, other: &Wrapping<F>)
fn bitor_assign(&mut self, other: &Wrapping<F>)
|=
operation. Read moresource§impl<F> BitOrAssign<F> for Wrapping<F>where
F: BitOrAssign<F>,
impl<F> BitOrAssign<F> for Wrapping<F>where
F: BitOrAssign<F>,
source§fn bitor_assign(&mut self, other: F)
fn bitor_assign(&mut self, other: F)
|=
operation. Read moresource§impl<F> BitOrAssign for Wrapping<F>where
F: BitOrAssign<F>,
impl<F> BitOrAssign for Wrapping<F>where
F: BitOrAssign<F>,
source§fn bitor_assign(&mut self, other: Wrapping<F>)
fn bitor_assign(&mut self, other: Wrapping<F>)
|=
operation. Read moresource§impl<F> BitXorAssign<&F> for Wrapping<F>where
for<'a> F: BitXorAssign<&'a F>,
impl<F> BitXorAssign<&F> for Wrapping<F>where
for<'a> F: BitXorAssign<&'a F>,
source§fn bitxor_assign(&mut self, other: &F)
fn bitxor_assign(&mut self, other: &F)
^=
operation. Read moresource§impl<F> BitXorAssign<&Wrapping<F>> for Wrapping<F>where
for<'a> F: BitXorAssign<&'a F>,
impl<F> BitXorAssign<&Wrapping<F>> for Wrapping<F>where
for<'a> F: BitXorAssign<&'a F>,
source§fn bitxor_assign(&mut self, other: &Wrapping<F>)
fn bitxor_assign(&mut self, other: &Wrapping<F>)
^=
operation. Read moresource§impl<F> BitXorAssign<F> for Wrapping<F>where
F: BitXorAssign<F>,
impl<F> BitXorAssign<F> for Wrapping<F>where
F: BitXorAssign<F>,
source§fn bitxor_assign(&mut self, other: F)
fn bitxor_assign(&mut self, other: F)
^=
operation. Read moresource§impl<F> BitXorAssign for Wrapping<F>where
F: BitXorAssign<F>,
impl<F> BitXorAssign for Wrapping<F>where
F: BitXorAssign<F>,
source§fn bitxor_assign(&mut self, other: Wrapping<F>)
fn bitxor_assign(&mut self, other: Wrapping<F>)
^=
operation. Read moresource§impl<Frac: LeEqU128> Contiguous for Wrapping<FixedI128<Frac>>
impl<Frac: LeEqU128> Contiguous for Wrapping<FixedI128<Frac>>
source§const MAX_VALUE: i128 = 170_141_183_460_469_231_731_687_303_715_884_105_727i128
const MAX_VALUE: i128 = 170_141_183_460_469_231_731_687_303_715_884_105_727i128
source§const MIN_VALUE: i128 = -170_141_183_460_469_231_731_687_303_715_884_105_728i128
const MIN_VALUE: i128 = -170_141_183_460_469_231_731_687_303_715_884_105_728i128
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU16> Contiguous for Wrapping<FixedI16<Frac>>
impl<Frac: LeEqU16> Contiguous for Wrapping<FixedI16<Frac>>
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU32> Contiguous for Wrapping<FixedI32<Frac>>
impl<Frac: LeEqU32> Contiguous for Wrapping<FixedI32<Frac>>
source§const MAX_VALUE: i32 = 2_147_483_647i32
const MAX_VALUE: i32 = 2_147_483_647i32
source§const MIN_VALUE: i32 = -2_147_483_648i32
const MIN_VALUE: i32 = -2_147_483_648i32
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU64> Contiguous for Wrapping<FixedI64<Frac>>
impl<Frac: LeEqU64> Contiguous for Wrapping<FixedI64<Frac>>
source§const MAX_VALUE: i64 = 9_223_372_036_854_775_807i64
const MAX_VALUE: i64 = 9_223_372_036_854_775_807i64
source§const MIN_VALUE: i64 = -9_223_372_036_854_775_808i64
const MIN_VALUE: i64 = -9_223_372_036_854_775_808i64
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU8> Contiguous for Wrapping<FixedI8<Frac>>
impl<Frac: LeEqU8> Contiguous for Wrapping<FixedI8<Frac>>
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU128> Contiguous for Wrapping<FixedU128<Frac>>
impl<Frac: LeEqU128> Contiguous for Wrapping<FixedU128<Frac>>
source§const MAX_VALUE: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128
const MAX_VALUE: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU16> Contiguous for Wrapping<FixedU16<Frac>>
impl<Frac: LeEqU16> Contiguous for Wrapping<FixedU16<Frac>>
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU32> Contiguous for Wrapping<FixedU32<Frac>>
impl<Frac: LeEqU32> Contiguous for Wrapping<FixedU32<Frac>>
source§const MAX_VALUE: u32 = 4_294_967_295u32
const MAX_VALUE: u32 = 4_294_967_295u32
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU64> Contiguous for Wrapping<FixedU64<Frac>>
impl<Frac: LeEqU64> Contiguous for Wrapping<FixedU64<Frac>>
source§const MAX_VALUE: u64 = 18_446_744_073_709_551_615u64
const MAX_VALUE: u64 = 18_446_744_073_709_551_615u64
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<Frac: LeEqU8> Contiguous for Wrapping<FixedU8<Frac>>
impl<Frac: LeEqU8> Contiguous for Wrapping<FixedU8<Frac>>
source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moresource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moresource§impl<'de, Frac: LeEqU128> Deserialize<'de> for Wrapping<FixedI128<Frac>>
impl<'de, Frac: LeEqU128> Deserialize<'de> for Wrapping<FixedI128<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU16> Deserialize<'de> for Wrapping<FixedI16<Frac>>
impl<'de, Frac: LeEqU16> Deserialize<'de> for Wrapping<FixedI16<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU32> Deserialize<'de> for Wrapping<FixedI32<Frac>>
impl<'de, Frac: LeEqU32> Deserialize<'de> for Wrapping<FixedI32<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU64> Deserialize<'de> for Wrapping<FixedI64<Frac>>
impl<'de, Frac: LeEqU64> Deserialize<'de> for Wrapping<FixedI64<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU8> Deserialize<'de> for Wrapping<FixedI8<Frac>>
impl<'de, Frac: LeEqU8> Deserialize<'de> for Wrapping<FixedI8<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU128> Deserialize<'de> for Wrapping<FixedU128<Frac>>
impl<'de, Frac: LeEqU128> Deserialize<'de> for Wrapping<FixedU128<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU16> Deserialize<'de> for Wrapping<FixedU16<Frac>>
impl<'de, Frac: LeEqU16> Deserialize<'de> for Wrapping<FixedU16<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU32> Deserialize<'de> for Wrapping<FixedU32<Frac>>
impl<'de, Frac: LeEqU32> Deserialize<'de> for Wrapping<FixedU32<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU64> Deserialize<'de> for Wrapping<FixedU64<Frac>>
impl<'de, Frac: LeEqU64> Deserialize<'de> for Wrapping<FixedU64<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<'de, Frac: LeEqU8> Deserialize<'de> for Wrapping<FixedU8<Frac>>
impl<'de, Frac: LeEqU8> Deserialize<'de> for Wrapping<FixedU8<Frac>>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl<F: Fixed> DivAssign<&F> for Wrapping<F>
impl<F: Fixed> DivAssign<&F> for Wrapping<F>
source§fn div_assign(&mut self, other: &F)
fn div_assign(&mut self, other: &F)
/=
operation. Read moresource§impl<F: Fixed> DivAssign<&Wrapping<F>> for Wrapping<F>
impl<F: Fixed> DivAssign<&Wrapping<F>> for Wrapping<F>
source§fn div_assign(&mut self, other: &Wrapping<F>)
fn div_assign(&mut self, other: &Wrapping<F>)
/=
operation. Read moresource§impl<Frac> DivAssign<&i128> for Wrapping<FixedI128<Frac>>
impl<Frac> DivAssign<&i128> for Wrapping<FixedI128<Frac>>
source§fn div_assign(&mut self, other: &i128)
fn div_assign(&mut self, other: &i128)
/=
operation. Read moresource§impl<Frac> DivAssign<&i16> for Wrapping<FixedI16<Frac>>
impl<Frac> DivAssign<&i16> for Wrapping<FixedI16<Frac>>
source§fn div_assign(&mut self, other: &i16)
fn div_assign(&mut self, other: &i16)
/=
operation. Read moresource§impl<Frac> DivAssign<&i32> for Wrapping<FixedI32<Frac>>
impl<Frac> DivAssign<&i32> for Wrapping<FixedI32<Frac>>
source§fn div_assign(&mut self, other: &i32)
fn div_assign(&mut self, other: &i32)
/=
operation. Read moresource§impl<Frac> DivAssign<&i64> for Wrapping<FixedI64<Frac>>
impl<Frac> DivAssign<&i64> for Wrapping<FixedI64<Frac>>
source§fn div_assign(&mut self, other: &i64)
fn div_assign(&mut self, other: &i64)
/=
operation. Read moresource§impl<Frac> DivAssign<&i8> for Wrapping<FixedI8<Frac>>
impl<Frac> DivAssign<&i8> for Wrapping<FixedI8<Frac>>
source§fn div_assign(&mut self, other: &i8)
fn div_assign(&mut self, other: &i8)
/=
operation. Read moresource§impl<Frac> DivAssign<&u128> for Wrapping<FixedU128<Frac>>
impl<Frac> DivAssign<&u128> for Wrapping<FixedU128<Frac>>
source§fn div_assign(&mut self, other: &u128)
fn div_assign(&mut self, other: &u128)
/=
operation. Read moresource§impl<Frac> DivAssign<&u16> for Wrapping<FixedU16<Frac>>
impl<Frac> DivAssign<&u16> for Wrapping<FixedU16<Frac>>
source§fn div_assign(&mut self, other: &u16)
fn div_assign(&mut self, other: &u16)
/=
operation. Read moresource§impl<Frac> DivAssign<&u32> for Wrapping<FixedU32<Frac>>
impl<Frac> DivAssign<&u32> for Wrapping<FixedU32<Frac>>
source§fn div_assign(&mut self, other: &u32)
fn div_assign(&mut self, other: &u32)
/=
operation. Read moresource§impl<Frac> DivAssign<&u64> for Wrapping<FixedU64<Frac>>
impl<Frac> DivAssign<&u64> for Wrapping<FixedU64<Frac>>
source§fn div_assign(&mut self, other: &u64)
fn div_assign(&mut self, other: &u64)
/=
operation. Read moresource§impl<Frac> DivAssign<&u8> for Wrapping<FixedU8<Frac>>
impl<Frac> DivAssign<&u8> for Wrapping<FixedU8<Frac>>
source§fn div_assign(&mut self, other: &u8)
fn div_assign(&mut self, other: &u8)
/=
operation. Read moresource§impl<F: Fixed> DivAssign<F> for Wrapping<F>
impl<F: Fixed> DivAssign<F> for Wrapping<F>
source§fn div_assign(&mut self, other: F)
fn div_assign(&mut self, other: F)
/=
operation. Read moresource§impl<Frac> DivAssign<i128> for Wrapping<FixedI128<Frac>>
impl<Frac> DivAssign<i128> for Wrapping<FixedI128<Frac>>
source§fn div_assign(&mut self, other: i128)
fn div_assign(&mut self, other: i128)
/=
operation. Read moresource§impl<Frac> DivAssign<i16> for Wrapping<FixedI16<Frac>>
impl<Frac> DivAssign<i16> for Wrapping<FixedI16<Frac>>
source§fn div_assign(&mut self, other: i16)
fn div_assign(&mut self, other: i16)
/=
operation. Read moresource§impl<Frac> DivAssign<i32> for Wrapping<FixedI32<Frac>>
impl<Frac> DivAssign<i32> for Wrapping<FixedI32<Frac>>
source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
/=
operation. Read moresource§impl<Frac> DivAssign<i64> for Wrapping<FixedI64<Frac>>
impl<Frac> DivAssign<i64> for Wrapping<FixedI64<Frac>>
source§fn div_assign(&mut self, other: i64)
fn div_assign(&mut self, other: i64)
/=
operation. Read moresource§impl<Frac> DivAssign<i8> for Wrapping<FixedI8<Frac>>
impl<Frac> DivAssign<i8> for Wrapping<FixedI8<Frac>>
source§fn div_assign(&mut self, other: i8)
fn div_assign(&mut self, other: i8)
/=
operation. Read moresource§impl<Frac> DivAssign<u128> for Wrapping<FixedU128<Frac>>
impl<Frac> DivAssign<u128> for Wrapping<FixedU128<Frac>>
source§fn div_assign(&mut self, other: u128)
fn div_assign(&mut self, other: u128)
/=
operation. Read moresource§impl<Frac> DivAssign<u16> for Wrapping<FixedU16<Frac>>
impl<Frac> DivAssign<u16> for Wrapping<FixedU16<Frac>>
source§fn div_assign(&mut self, other: u16)
fn div_assign(&mut self, other: u16)
/=
operation. Read moresource§impl<Frac> DivAssign<u32> for Wrapping<FixedU32<Frac>>
impl<Frac> DivAssign<u32> for Wrapping<FixedU32<Frac>>
source§fn div_assign(&mut self, other: u32)
fn div_assign(&mut self, other: u32)
/=
operation. Read moresource§impl<Frac> DivAssign<u64> for Wrapping<FixedU64<Frac>>
impl<Frac> DivAssign<u64> for Wrapping<FixedU64<Frac>>
source§fn div_assign(&mut self, other: u64)
fn div_assign(&mut self, other: u64)
/=
operation. Read moresource§impl<Frac> DivAssign<u8> for Wrapping<FixedU8<Frac>>
impl<Frac> DivAssign<u8> for Wrapping<FixedU8<Frac>>
source§fn div_assign(&mut self, other: u8)
fn div_assign(&mut self, other: u8)
/=
operation. Read moresource§impl<F: Fixed> DivAssign for Wrapping<F>
impl<F: Fixed> DivAssign for Wrapping<F>
source§fn div_assign(&mut self, other: Wrapping<F>)
fn div_assign(&mut self, other: Wrapping<F>)
/=
operation. Read moresource§impl<F: Fixed> MulAssign<&F> for Wrapping<F>
impl<F: Fixed> MulAssign<&F> for Wrapping<F>
source§fn mul_assign(&mut self, other: &F)
fn mul_assign(&mut self, other: &F)
*=
operation. Read moresource§impl<F: Fixed> MulAssign<&Wrapping<F>> for Wrapping<F>
impl<F: Fixed> MulAssign<&Wrapping<F>> for Wrapping<F>
source§fn mul_assign(&mut self, other: &Wrapping<F>)
fn mul_assign(&mut self, other: &Wrapping<F>)
*=
operation. Read moresource§impl<Frac> MulAssign<&i128> for Wrapping<FixedI128<Frac>>
impl<Frac> MulAssign<&i128> for Wrapping<FixedI128<Frac>>
source§fn mul_assign(&mut self, other: &i128)
fn mul_assign(&mut self, other: &i128)
*=
operation. Read moresource§impl<Frac> MulAssign<&i16> for Wrapping<FixedI16<Frac>>
impl<Frac> MulAssign<&i16> for Wrapping<FixedI16<Frac>>
source§fn mul_assign(&mut self, other: &i16)
fn mul_assign(&mut self, other: &i16)
*=
operation. Read moresource§impl<Frac> MulAssign<&i32> for Wrapping<FixedI32<Frac>>
impl<Frac> MulAssign<&i32> for Wrapping<FixedI32<Frac>>
source§fn mul_assign(&mut self, other: &i32)
fn mul_assign(&mut self, other: &i32)
*=
operation. Read moresource§impl<Frac> MulAssign<&i64> for Wrapping<FixedI64<Frac>>
impl<Frac> MulAssign<&i64> for Wrapping<FixedI64<Frac>>
source§fn mul_assign(&mut self, other: &i64)
fn mul_assign(&mut self, other: &i64)
*=
operation. Read moresource§impl<Frac> MulAssign<&i8> for Wrapping<FixedI8<Frac>>
impl<Frac> MulAssign<&i8> for Wrapping<FixedI8<Frac>>
source§fn mul_assign(&mut self, other: &i8)
fn mul_assign(&mut self, other: &i8)
*=
operation. Read moresource§impl<Frac> MulAssign<&u128> for Wrapping<FixedU128<Frac>>
impl<Frac> MulAssign<&u128> for Wrapping<FixedU128<Frac>>
source§fn mul_assign(&mut self, other: &u128)
fn mul_assign(&mut self, other: &u128)
*=
operation. Read moresource§impl<Frac> MulAssign<&u16> for Wrapping<FixedU16<Frac>>
impl<Frac> MulAssign<&u16> for Wrapping<FixedU16<Frac>>
source§fn mul_assign(&mut self, other: &u16)
fn mul_assign(&mut self, other: &u16)
*=
operation. Read moresource§impl<Frac> MulAssign<&u32> for Wrapping<FixedU32<Frac>>
impl<Frac> MulAssign<&u32> for Wrapping<FixedU32<Frac>>
source§fn mul_assign(&mut self, other: &u32)
fn mul_assign(&mut self, other: &u32)
*=
operation. Read moresource§impl<Frac> MulAssign<&u64> for Wrapping<FixedU64<Frac>>
impl<Frac> MulAssign<&u64> for Wrapping<FixedU64<Frac>>
source§fn mul_assign(&mut self, other: &u64)
fn mul_assign(&mut self, other: &u64)
*=
operation. Read moresource§impl<Frac> MulAssign<&u8> for Wrapping<FixedU8<Frac>>
impl<Frac> MulAssign<&u8> for Wrapping<FixedU8<Frac>>
source§fn mul_assign(&mut self, other: &u8)
fn mul_assign(&mut self, other: &u8)
*=
operation. Read moresource§impl<F: Fixed> MulAssign<F> for Wrapping<F>
impl<F: Fixed> MulAssign<F> for Wrapping<F>
source§fn mul_assign(&mut self, other: F)
fn mul_assign(&mut self, other: F)
*=
operation. Read moresource§impl<Frac> MulAssign<i128> for Wrapping<FixedI128<Frac>>
impl<Frac> MulAssign<i128> for Wrapping<FixedI128<Frac>>
source§fn mul_assign(&mut self, other: i128)
fn mul_assign(&mut self, other: i128)
*=
operation. Read moresource§impl<Frac> MulAssign<i16> for Wrapping<FixedI16<Frac>>
impl<Frac> MulAssign<i16> for Wrapping<FixedI16<Frac>>
source§fn mul_assign(&mut self, other: i16)
fn mul_assign(&mut self, other: i16)
*=
operation. Read moresource§impl<Frac> MulAssign<i32> for Wrapping<FixedI32<Frac>>
impl<Frac> MulAssign<i32> for Wrapping<FixedI32<Frac>>
source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
*=
operation. Read moresource§impl<Frac> MulAssign<i64> for Wrapping<FixedI64<Frac>>
impl<Frac> MulAssign<i64> for Wrapping<FixedI64<Frac>>
source§fn mul_assign(&mut self, other: i64)
fn mul_assign(&mut self, other: i64)
*=
operation. Read moresource§impl<Frac> MulAssign<i8> for Wrapping<FixedI8<Frac>>
impl<Frac> MulAssign<i8> for Wrapping<FixedI8<Frac>>
source§fn mul_assign(&mut self, other: i8)
fn mul_assign(&mut self, other: i8)
*=
operation. Read moresource§impl<Frac> MulAssign<u128> for Wrapping<FixedU128<Frac>>
impl<Frac> MulAssign<u128> for Wrapping<FixedU128<Frac>>
source§fn mul_assign(&mut self, other: u128)
fn mul_assign(&mut self, other: u128)
*=
operation. Read moresource§impl<Frac> MulAssign<u16> for Wrapping<FixedU16<Frac>>
impl<Frac> MulAssign<u16> for Wrapping<FixedU16<Frac>>
source§fn mul_assign(&mut self, other: u16)
fn mul_assign(&mut self, other: u16)
*=
operation. Read moresource§impl<Frac> MulAssign<u32> for Wrapping<FixedU32<Frac>>
impl<Frac> MulAssign<u32> for Wrapping<FixedU32<Frac>>
source§fn mul_assign(&mut self, other: u32)
fn mul_assign(&mut self, other: u32)
*=
operation. Read moresource§impl<Frac> MulAssign<u64> for Wrapping<FixedU64<Frac>>
impl<Frac> MulAssign<u64> for Wrapping<FixedU64<Frac>>
source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
*=
operation. Read moresource§impl<Frac> MulAssign<u8> for Wrapping<FixedU8<Frac>>
impl<Frac> MulAssign<u8> for Wrapping<FixedU8<Frac>>
source§fn mul_assign(&mut self, other: u8)
fn mul_assign(&mut self, other: u8)
*=
operation. Read moresource§impl<F: Fixed> MulAssign for Wrapping<F>
impl<F: Fixed> MulAssign for Wrapping<F>
source§fn mul_assign(&mut self, other: Wrapping<F>)
fn mul_assign(&mut self, other: Wrapping<F>)
*=
operation. Read moresource§impl<F: Ord> Ord for Wrapping<F>
impl<F: Ord> Ord for Wrapping<F>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<F: PartialEq> PartialEq for Wrapping<F>
impl<F: PartialEq> PartialEq for Wrapping<F>
source§impl<F: PartialOrd> PartialOrd for Wrapping<F>
impl<F: PartialOrd> PartialOrd for Wrapping<F>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<F: Fixed> RemAssign<&F> for Wrapping<F>
impl<F: Fixed> RemAssign<&F> for Wrapping<F>
source§fn rem_assign(&mut self, other: &F)
fn rem_assign(&mut self, other: &F)
%=
operation. Read moresource§impl<F: Fixed> RemAssign<&Wrapping<F>> for Wrapping<F>
impl<F: Fixed> RemAssign<&Wrapping<F>> for Wrapping<F>
source§fn rem_assign(&mut self, other: &Wrapping<F>)
fn rem_assign(&mut self, other: &Wrapping<F>)
%=
operation. Read moresource§impl<Frac: LeEqU128> RemAssign<&i128> for Wrapping<FixedI128<Frac>>
impl<Frac: LeEqU128> RemAssign<&i128> for Wrapping<FixedI128<Frac>>
source§fn rem_assign(&mut self, other: &i128)
fn rem_assign(&mut self, other: &i128)
%=
operation. Read moresource§impl<Frac: LeEqU16> RemAssign<&i16> for Wrapping<FixedI16<Frac>>
impl<Frac: LeEqU16> RemAssign<&i16> for Wrapping<FixedI16<Frac>>
source§fn rem_assign(&mut self, other: &i16)
fn rem_assign(&mut self, other: &i16)
%=
operation. Read moresource§impl<Frac: LeEqU32> RemAssign<&i32> for Wrapping<FixedI32<Frac>>
impl<Frac: LeEqU32> RemAssign<&i32> for Wrapping<FixedI32<Frac>>
source§fn rem_assign(&mut self, other: &i32)
fn rem_assign(&mut self, other: &i32)
%=
operation. Read moresource§impl<Frac: LeEqU64> RemAssign<&i64> for Wrapping<FixedI64<Frac>>
impl<Frac: LeEqU64> RemAssign<&i64> for Wrapping<FixedI64<Frac>>
source§fn rem_assign(&mut self, other: &i64)
fn rem_assign(&mut self, other: &i64)
%=
operation. Read moresource§impl<Frac: LeEqU8> RemAssign<&i8> for Wrapping<FixedI8<Frac>>
impl<Frac: LeEqU8> RemAssign<&i8> for Wrapping<FixedI8<Frac>>
source§fn rem_assign(&mut self, other: &i8)
fn rem_assign(&mut self, other: &i8)
%=
operation. Read moresource§impl<Frac: LeEqU128> RemAssign<&u128> for Wrapping<FixedU128<Frac>>
impl<Frac: LeEqU128> RemAssign<&u128> for Wrapping<FixedU128<Frac>>
source§fn rem_assign(&mut self, other: &u128)
fn rem_assign(&mut self, other: &u128)
%=
operation. Read moresource§impl<Frac: LeEqU16> RemAssign<&u16> for Wrapping<FixedU16<Frac>>
impl<Frac: LeEqU16> RemAssign<&u16> for Wrapping<FixedU16<Frac>>
source§fn rem_assign(&mut self, other: &u16)
fn rem_assign(&mut self, other: &u16)
%=
operation. Read moresource§impl<Frac: LeEqU32> RemAssign<&u32> for Wrapping<FixedU32<Frac>>
impl<Frac: LeEqU32> RemAssign<&u32> for Wrapping<FixedU32<Frac>>
source§fn rem_assign(&mut self, other: &u32)
fn rem_assign(&mut self, other: &u32)
%=
operation. Read moresource§impl<Frac: LeEqU64> RemAssign<&u64> for Wrapping<FixedU64<Frac>>
impl<Frac: LeEqU64> RemAssign<&u64> for Wrapping<FixedU64<Frac>>
source§fn rem_assign(&mut self, other: &u64)
fn rem_assign(&mut self, other: &u64)
%=
operation. Read moresource§impl<Frac: LeEqU8> RemAssign<&u8> for Wrapping<FixedU8<Frac>>
impl<Frac: LeEqU8> RemAssign<&u8> for Wrapping<FixedU8<Frac>>
source§fn rem_assign(&mut self, other: &u8)
fn rem_assign(&mut self, other: &u8)
%=
operation. Read moresource§impl<F: Fixed> RemAssign<F> for Wrapping<F>
impl<F: Fixed> RemAssign<F> for Wrapping<F>
source§fn rem_assign(&mut self, other: F)
fn rem_assign(&mut self, other: F)
%=
operation. Read moresource§impl<Frac: LeEqU128> RemAssign<i128> for Wrapping<FixedI128<Frac>>
impl<Frac: LeEqU128> RemAssign<i128> for Wrapping<FixedI128<Frac>>
source§fn rem_assign(&mut self, other: i128)
fn rem_assign(&mut self, other: i128)
%=
operation. Read moresource§impl<Frac: LeEqU16> RemAssign<i16> for Wrapping<FixedI16<Frac>>
impl<Frac: LeEqU16> RemAssign<i16> for Wrapping<FixedI16<Frac>>
source§fn rem_assign(&mut self, other: i16)
fn rem_assign(&mut self, other: i16)
%=
operation. Read moresource§impl<Frac: LeEqU32> RemAssign<i32> for Wrapping<FixedI32<Frac>>
impl<Frac: LeEqU32> RemAssign<i32> for Wrapping<FixedI32<Frac>>
source§fn rem_assign(&mut self, other: i32)
fn rem_assign(&mut self, other: i32)
%=
operation. Read moresource§impl<Frac: LeEqU64> RemAssign<i64> for Wrapping<FixedI64<Frac>>
impl<Frac: LeEqU64> RemAssign<i64> for Wrapping<FixedI64<Frac>>
source§fn rem_assign(&mut self, other: i64)
fn rem_assign(&mut self, other: i64)
%=
operation. Read moresource§impl<Frac: LeEqU8> RemAssign<i8> for Wrapping<FixedI8<Frac>>
impl<Frac: LeEqU8> RemAssign<i8> for Wrapping<FixedI8<Frac>>
source§fn rem_assign(&mut self, other: i8)
fn rem_assign(&mut self, other: i8)
%=
operation. Read moresource§impl<Frac: LeEqU128> RemAssign<u128> for Wrapping<FixedU128<Frac>>
impl<Frac: LeEqU128> RemAssign<u128> for Wrapping<FixedU128<Frac>>
source§fn rem_assign(&mut self, other: u128)
fn rem_assign(&mut self, other: u128)
%=
operation. Read moresource§impl<Frac: LeEqU16> RemAssign<u16> for Wrapping<FixedU16<Frac>>
impl<Frac: LeEqU16> RemAssign<u16> for Wrapping<FixedU16<Frac>>
source§fn rem_assign(&mut self, other: u16)
fn rem_assign(&mut self, other: u16)
%=
operation. Read moresource§impl<Frac: LeEqU32> RemAssign<u32> for Wrapping<FixedU32<Frac>>
impl<Frac: LeEqU32> RemAssign<u32> for Wrapping<FixedU32<Frac>>
source§fn rem_assign(&mut self, other: u32)
fn rem_assign(&mut self, other: u32)
%=
operation. Read moresource§impl<Frac: LeEqU64> RemAssign<u64> for Wrapping<FixedU64<Frac>>
impl<Frac: LeEqU64> RemAssign<u64> for Wrapping<FixedU64<Frac>>
source§fn rem_assign(&mut self, other: u64)
fn rem_assign(&mut self, other: u64)
%=
operation. Read moresource§impl<Frac: LeEqU8> RemAssign<u8> for Wrapping<FixedU8<Frac>>
impl<Frac: LeEqU8> RemAssign<u8> for Wrapping<FixedU8<Frac>>
source§fn rem_assign(&mut self, other: u8)
fn rem_assign(&mut self, other: u8)
%=
operation. Read moresource§impl<F: Fixed> RemAssign for Wrapping<F>
impl<F: Fixed> RemAssign for Wrapping<F>
source§fn rem_assign(&mut self, other: Wrapping<F>)
fn rem_assign(&mut self, other: Wrapping<F>)
%=
operation. Read moresource§impl<F> ShlAssign<&i128> for Wrapping<F>
impl<F> ShlAssign<&i128> for Wrapping<F>
source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<=
operation. Read moresource§impl<F> ShlAssign<&i16> for Wrapping<F>
impl<F> ShlAssign<&i16> for Wrapping<F>
source§fn shl_assign(&mut self, other: &i16)
fn shl_assign(&mut self, other: &i16)
<<=
operation. Read moresource§impl<F> ShlAssign<&i32> for Wrapping<F>
impl<F> ShlAssign<&i32> for Wrapping<F>
source§fn shl_assign(&mut self, other: &i32)
fn shl_assign(&mut self, other: &i32)
<<=
operation. Read moresource§impl<F> ShlAssign<&i64> for Wrapping<F>
impl<F> ShlAssign<&i64> for Wrapping<F>
source§fn shl_assign(&mut self, other: &i64)
fn shl_assign(&mut self, other: &i64)
<<=
operation. Read moresource§impl<F> ShlAssign<&i8> for Wrapping<F>
impl<F> ShlAssign<&i8> for Wrapping<F>
source§fn shl_assign(&mut self, other: &i8)
fn shl_assign(&mut self, other: &i8)
<<=
operation. Read moresource§impl<F> ShlAssign<&isize> for Wrapping<F>
impl<F> ShlAssign<&isize> for Wrapping<F>
source§fn shl_assign(&mut self, other: &isize)
fn shl_assign(&mut self, other: &isize)
<<=
operation. Read moresource§impl<F> ShlAssign<&u128> for Wrapping<F>
impl<F> ShlAssign<&u128> for Wrapping<F>
source§fn shl_assign(&mut self, other: &u128)
fn shl_assign(&mut self, other: &u128)
<<=
operation. Read moresource§impl<F> ShlAssign<&u16> for Wrapping<F>
impl<F> ShlAssign<&u16> for Wrapping<F>
source§fn shl_assign(&mut self, other: &u16)
fn shl_assign(&mut self, other: &u16)
<<=
operation. Read moresource§impl<F> ShlAssign<&u32> for Wrapping<F>
impl<F> ShlAssign<&u32> for Wrapping<F>
source§fn shl_assign(&mut self, other: &u32)
fn shl_assign(&mut self, other: &u32)
<<=
operation. Read moresource§impl<F> ShlAssign<&u64> for Wrapping<F>
impl<F> ShlAssign<&u64> for Wrapping<F>
source§fn shl_assign(&mut self, other: &u64)
fn shl_assign(&mut self, other: &u64)
<<=
operation. Read moresource§impl<F> ShlAssign<&u8> for Wrapping<F>
impl<F> ShlAssign<&u8> for Wrapping<F>
source§fn shl_assign(&mut self, other: &u8)
fn shl_assign(&mut self, other: &u8)
<<=
operation. Read moresource§impl<F> ShlAssign<&usize> for Wrapping<F>
impl<F> ShlAssign<&usize> for Wrapping<F>
source§fn shl_assign(&mut self, other: &usize)
fn shl_assign(&mut self, other: &usize)
<<=
operation. Read moresource§impl<F> ShlAssign<i128> for Wrapping<F>
impl<F> ShlAssign<i128> for Wrapping<F>
source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<=
operation. Read moresource§impl<F> ShlAssign<i16> for Wrapping<F>
impl<F> ShlAssign<i16> for Wrapping<F>
source§fn shl_assign(&mut self, other: i16)
fn shl_assign(&mut self, other: i16)
<<=
operation. Read moresource§impl<F> ShlAssign<i32> for Wrapping<F>
impl<F> ShlAssign<i32> for Wrapping<F>
source§fn shl_assign(&mut self, other: i32)
fn shl_assign(&mut self, other: i32)
<<=
operation. Read moresource§impl<F> ShlAssign<i64> for Wrapping<F>
impl<F> ShlAssign<i64> for Wrapping<F>
source§fn shl_assign(&mut self, other: i64)
fn shl_assign(&mut self, other: i64)
<<=
operation. Read moresource§impl<F> ShlAssign<i8> for Wrapping<F>
impl<F> ShlAssign<i8> for Wrapping<F>
source§fn shl_assign(&mut self, other: i8)
fn shl_assign(&mut self, other: i8)
<<=
operation. Read moresource§impl<F> ShlAssign<isize> for Wrapping<F>
impl<F> ShlAssign<isize> for Wrapping<F>
source§fn shl_assign(&mut self, other: isize)
fn shl_assign(&mut self, other: isize)
<<=
operation. Read moresource§impl<F> ShlAssign<u128> for Wrapping<F>
impl<F> ShlAssign<u128> for Wrapping<F>
source§fn shl_assign(&mut self, other: u128)
fn shl_assign(&mut self, other: u128)
<<=
operation. Read moresource§impl<F> ShlAssign<u16> for Wrapping<F>
impl<F> ShlAssign<u16> for Wrapping<F>
source§fn shl_assign(&mut self, other: u16)
fn shl_assign(&mut self, other: u16)
<<=
operation. Read moresource§impl<F> ShlAssign<u32> for Wrapping<F>
impl<F> ShlAssign<u32> for Wrapping<F>
source§fn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
<<=
operation. Read moresource§impl<F> ShlAssign<u64> for Wrapping<F>
impl<F> ShlAssign<u64> for Wrapping<F>
source§fn shl_assign(&mut self, other: u64)
fn shl_assign(&mut self, other: u64)
<<=
operation. Read moresource§impl<F> ShlAssign<u8> for Wrapping<F>
impl<F> ShlAssign<u8> for Wrapping<F>
source§fn shl_assign(&mut self, other: u8)
fn shl_assign(&mut self, other: u8)
<<=
operation. Read moresource§impl<F> ShlAssign<usize> for Wrapping<F>
impl<F> ShlAssign<usize> for Wrapping<F>
source§fn shl_assign(&mut self, other: usize)
fn shl_assign(&mut self, other: usize)
<<=
operation. Read moresource§impl<F> ShrAssign<&i128> for Wrapping<F>
impl<F> ShrAssign<&i128> for Wrapping<F>
source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>=
operation. Read moresource§impl<F> ShrAssign<&i16> for Wrapping<F>
impl<F> ShrAssign<&i16> for Wrapping<F>
source§fn shr_assign(&mut self, other: &i16)
fn shr_assign(&mut self, other: &i16)
>>=
operation. Read moresource§impl<F> ShrAssign<&i32> for Wrapping<F>
impl<F> ShrAssign<&i32> for Wrapping<F>
source§fn shr_assign(&mut self, other: &i32)
fn shr_assign(&mut self, other: &i32)
>>=
operation. Read moresource§impl<F> ShrAssign<&i64> for Wrapping<F>
impl<F> ShrAssign<&i64> for Wrapping<F>
source§fn shr_assign(&mut self, other: &i64)
fn shr_assign(&mut self, other: &i64)
>>=
operation. Read moresource§impl<F> ShrAssign<&i8> for Wrapping<F>
impl<F> ShrAssign<&i8> for Wrapping<F>
source§fn shr_assign(&mut self, other: &i8)
fn shr_assign(&mut self, other: &i8)
>>=
operation. Read moresource§impl<F> ShrAssign<&isize> for Wrapping<F>
impl<F> ShrAssign<&isize> for Wrapping<F>
source§fn shr_assign(&mut self, other: &isize)
fn shr_assign(&mut self, other: &isize)
>>=
operation. Read moresource§impl<F> ShrAssign<&u128> for Wrapping<F>
impl<F> ShrAssign<&u128> for Wrapping<F>
source§fn shr_assign(&mut self, other: &u128)
fn shr_assign(&mut self, other: &u128)
>>=
operation. Read moresource§impl<F> ShrAssign<&u16> for Wrapping<F>
impl<F> ShrAssign<&u16> for Wrapping<F>
source§fn shr_assign(&mut self, other: &u16)
fn shr_assign(&mut self, other: &u16)
>>=
operation. Read moresource§impl<F> ShrAssign<&u32> for Wrapping<F>
impl<F> ShrAssign<&u32> for Wrapping<F>
source§fn shr_assign(&mut self, other: &u32)
fn shr_assign(&mut self, other: &u32)
>>=
operation. Read moresource§impl<F> ShrAssign<&u64> for Wrapping<F>
impl<F> ShrAssign<&u64> for Wrapping<F>
source§fn shr_assign(&mut self, other: &u64)
fn shr_assign(&mut self, other: &u64)
>>=
operation. Read moresource§impl<F> ShrAssign<&u8> for Wrapping<F>
impl<F> ShrAssign<&u8> for Wrapping<F>
source§fn shr_assign(&mut self, other: &u8)
fn shr_assign(&mut self, other: &u8)
>>=
operation. Read moresource§impl<F> ShrAssign<&usize> for Wrapping<F>
impl<F> ShrAssign<&usize> for Wrapping<F>
source§fn shr_assign(&mut self, other: &usize)
fn shr_assign(&mut self, other: &usize)
>>=
operation. Read moresource§impl<F> ShrAssign<i128> for Wrapping<F>
impl<F> ShrAssign<i128> for Wrapping<F>
source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>=
operation. Read moresource§impl<F> ShrAssign<i16> for Wrapping<F>
impl<F> ShrAssign<i16> for Wrapping<F>
source§fn shr_assign(&mut self, other: i16)
fn shr_assign(&mut self, other: i16)
>>=
operation. Read moresource§impl<F> ShrAssign<i32> for Wrapping<F>
impl<F> ShrAssign<i32> for Wrapping<F>
source§fn shr_assign(&mut self, other: i32)
fn shr_assign(&mut self, other: i32)
>>=
operation. Read moresource§impl<F> ShrAssign<i64> for Wrapping<F>
impl<F> ShrAssign<i64> for Wrapping<F>
source§fn shr_assign(&mut self, other: i64)
fn shr_assign(&mut self, other: i64)
>>=
operation. Read moresource§impl<F> ShrAssign<i8> for Wrapping<F>
impl<F> ShrAssign<i8> for Wrapping<F>
source§fn shr_assign(&mut self, other: i8)
fn shr_assign(&mut self, other: i8)
>>=
operation. Read moresource§impl<F> ShrAssign<isize> for Wrapping<F>
impl<F> ShrAssign<isize> for Wrapping<F>
source§fn shr_assign(&mut self, other: isize)
fn shr_assign(&mut self, other: isize)
>>=
operation. Read moresource§impl<F> ShrAssign<u128> for Wrapping<F>
impl<F> ShrAssign<u128> for Wrapping<F>
source§fn shr_assign(&mut self, other: u128)
fn shr_assign(&mut self, other: u128)
>>=
operation. Read moresource§impl<F> ShrAssign<u16> for Wrapping<F>
impl<F> ShrAssign<u16> for Wrapping<F>
source§fn shr_assign(&mut self, other: u16)
fn shr_assign(&mut self, other: u16)
>>=
operation. Read moresource§impl<F> ShrAssign<u32> for Wrapping<F>
impl<F> ShrAssign<u32> for Wrapping<F>
source§fn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
>>=
operation. Read moresource§impl<F> ShrAssign<u64> for Wrapping<F>
impl<F> ShrAssign<u64> for Wrapping<F>
source§fn shr_assign(&mut self, other: u64)
fn shr_assign(&mut self, other: u64)
>>=
operation. Read moresource§impl<F> ShrAssign<u8> for Wrapping<F>
impl<F> ShrAssign<u8> for Wrapping<F>
source§fn shr_assign(&mut self, other: u8)
fn shr_assign(&mut self, other: u8)
>>=
operation. Read moresource§impl<F> ShrAssign<usize> for Wrapping<F>
impl<F> ShrAssign<usize> for Wrapping<F>
source§fn shr_assign(&mut self, other: usize)
fn shr_assign(&mut self, other: usize)
>>=
operation. Read moresource§impl<F: Fixed> SubAssign<&F> for Wrapping<F>
impl<F: Fixed> SubAssign<&F> for Wrapping<F>
source§fn sub_assign(&mut self, other: &F)
fn sub_assign(&mut self, other: &F)
-=
operation. Read moresource§impl<F: Fixed> SubAssign<&Wrapping<F>> for Wrapping<F>
impl<F: Fixed> SubAssign<&Wrapping<F>> for Wrapping<F>
source§fn sub_assign(&mut self, other: &Wrapping<F>)
fn sub_assign(&mut self, other: &Wrapping<F>)
-=
operation. Read moresource§impl<F: Fixed> SubAssign<F> for Wrapping<F>
impl<F: Fixed> SubAssign<F> for Wrapping<F>
source§fn sub_assign(&mut self, other: F)
fn sub_assign(&mut self, other: F)
-=
operation. Read moresource§impl<F: Fixed> SubAssign for Wrapping<F>
impl<F: Fixed> SubAssign for Wrapping<F>
source§fn sub_assign(&mut self, other: Wrapping<F>)
fn sub_assign(&mut self, other: Wrapping<F>)
-=
operation. Read moresource§impl<Frac: LeEqU128> TransparentWrapper<FixedI128<Frac>> for Wrapping<FixedI128<Frac>>
impl<Frac: LeEqU128> TransparentWrapper<FixedI128<Frac>> for Wrapping<FixedI128<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU16> TransparentWrapper<FixedI16<Frac>> for Wrapping<FixedI16<Frac>>
impl<Frac: LeEqU16> TransparentWrapper<FixedI16<Frac>> for Wrapping<FixedI16<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU32> TransparentWrapper<FixedI32<Frac>> for Wrapping<FixedI32<Frac>>
impl<Frac: LeEqU32> TransparentWrapper<FixedI32<Frac>> for Wrapping<FixedI32<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU64> TransparentWrapper<FixedI64<Frac>> for Wrapping<FixedI64<Frac>>
impl<Frac: LeEqU64> TransparentWrapper<FixedI64<Frac>> for Wrapping<FixedI64<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU8> TransparentWrapper<FixedI8<Frac>> for Wrapping<FixedI8<Frac>>
impl<Frac: LeEqU8> TransparentWrapper<FixedI8<Frac>> for Wrapping<FixedI8<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU128> TransparentWrapper<FixedU128<Frac>> for Wrapping<FixedU128<Frac>>
impl<Frac: LeEqU128> TransparentWrapper<FixedU128<Frac>> for Wrapping<FixedU128<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU16> TransparentWrapper<FixedU16<Frac>> for Wrapping<FixedU16<Frac>>
impl<Frac: LeEqU16> TransparentWrapper<FixedU16<Frac>> for Wrapping<FixedU16<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU32> TransparentWrapper<FixedU32<Frac>> for Wrapping<FixedU32<Frac>>
impl<Frac: LeEqU32> TransparentWrapper<FixedU32<Frac>> for Wrapping<FixedU32<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU64> TransparentWrapper<FixedU64<Frac>> for Wrapping<FixedU64<Frac>>
impl<Frac: LeEqU64> TransparentWrapper<FixedU64<Frac>> for Wrapping<FixedU64<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
source§impl<Frac: LeEqU8> TransparentWrapper<FixedU8<Frac>> for Wrapping<FixedU8<Frac>>
impl<Frac: LeEqU8> TransparentWrapper<FixedU8<Frac>> for Wrapping<FixedU8<Frac>>
source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
impl<F: Copy> Copy for Wrapping<F>
impl<F: Eq> Eq for Wrapping<F>
impl<Frac: LeEqU128> Pod for Wrapping<FixedI128<Frac>>
impl<Frac: LeEqU16> Pod for Wrapping<FixedI16<Frac>>
impl<Frac: LeEqU32> Pod for Wrapping<FixedI32<Frac>>
impl<Frac: LeEqU64> Pod for Wrapping<FixedI64<Frac>>
impl<Frac: LeEqU8> Pod for Wrapping<FixedI8<Frac>>
impl<Frac: LeEqU128> Pod for Wrapping<FixedU128<Frac>>
impl<Frac: LeEqU16> Pod for Wrapping<FixedU16<Frac>>
impl<Frac: LeEqU32> Pod for Wrapping<FixedU32<Frac>>
impl<Frac: LeEqU64> Pod for Wrapping<FixedU64<Frac>>
impl<Frac: LeEqU8> Pod for Wrapping<FixedU8<Frac>>
impl<F> StructuralPartialEq for Wrapping<F>
Auto Trait Implementations§
impl<F> Freeze for Wrapping<F>where
F: Freeze,
impl<F> RefUnwindSafe for Wrapping<F>where
F: RefUnwindSafe,
impl<F> Send for Wrapping<F>where
F: Send,
impl<F> Sync for Wrapping<F>where
F: Sync,
impl<F> Unpin for Wrapping<F>where
F: Unpin,
impl<F> UnwindSafe for Wrapping<F>where
F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)