Struct fixed::Unwrapped [−][src]
#[repr(transparent)]pub struct Unwrapped<F>(pub F);
Expand description
Provides arithmetic operations that panic on overflow even when debug assertions are disabled.
The underlying value can be retrieved through the .0
index.
Examples
This panics even when debug assertions are disabled.
use fixed::{types::I16F16, Unwrapped}; let max = Unwrapped(I16F16::MAX); let delta = Unwrapped(I16F16::DELTA); let _overflow = max + delta;
Implementations
impl<F: Fixed> Unwrapped<F>
[src]
impl<F: Fixed> Unwrapped<F>
[src]pub const FRAC_NBITS: u32
[src]
pub const FRAC_NBITS: u32
[src]The number of fractional bits.
See also FixedI32::FRAC_NBITS
and
FixedU32::FRAC_NBITS
.
Examples
use fixed::{types::I16F16, Unwrapped}; assert_eq!(Unwrapped::<I16F16>::FRAC_NBITS, I16F16::FRAC_NBITS);
pub fn from_be(w: Self) -> Self
[src]
pub fn from_be(w: Self) -> Self
[src]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, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x1234_5678)); if cfg!(target_endian = "big") { assert_eq!(Unwrapped::from_be(w), w); } else { assert_eq!(Unwrapped::from_be(w), w.swap_bytes()); }
pub fn from_le(w: Self) -> Self
[src]
pub fn from_le(w: Self) -> Self
[src]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, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x1234_5678)); if cfg!(target_endian = "little") { assert_eq!(Unwrapped::from_le(w), w); } else { assert_eq!(Unwrapped::from_le(w), w.swap_bytes()); }
pub fn to_be(self) -> Self
[src]
pub fn to_be(self) -> Self
[src]Converts self
to big endian from the target’s endianness.
See also FixedI32::to_be
and
FixedU32::to_be
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(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()); }
pub fn to_le(self) -> Self
[src]
pub fn to_le(self) -> Self
[src]Converts self
to little endian from the target’s endianness.
See also FixedI32::to_le
and
FixedU32::to_le
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(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()); }
pub fn swap_bytes(self) -> Self
[src]
pub fn swap_bytes(self) -> Self
[src]Reverses the byte order of the fixed-point number.
See also FixedI32::swap_bytes
and
FixedU32::swap_bytes
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x1234_5678)); let swapped = Unwrapped(I16F16::from_bits(0x7856_3412)); assert_eq!(w.swap_bytes(), swapped);
pub fn from_be_bytes(bytes: F::Bytes) -> Self
[src]
pub fn from_be_bytes(bytes: F::Bytes) -> Self
[src]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, Unwrapped}; let bytes = [0x12, 0x34, 0x56, 0x78]; assert_eq!( Unwrapped::<I16F16>::from_be_bytes(bytes), Unwrapped::<I16F16>::from_bits(0x1234_5678) );
pub fn from_le_bytes(bytes: F::Bytes) -> Self
[src]
pub fn from_le_bytes(bytes: F::Bytes) -> Self
[src]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, Unwrapped}; let bytes = [0x78, 0x56, 0x34, 0x12]; assert_eq!( Unwrapped::<I16F16>::from_le_bytes(bytes), Unwrapped::<I16F16>::from_bits(0x1234_5678) );
pub fn from_ne_bytes(bytes: F::Bytes) -> Self
[src]
pub fn from_ne_bytes(bytes: F::Bytes) -> Self
[src]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, Unwrapped}; let bytes = if cfg!(target_endian = "big") { [0x12, 0x34, 0x56, 0x78] } else { [0x78, 0x56, 0x34, 0x12] }; assert_eq!( Unwrapped::<I16F16>::from_ne_bytes(bytes), Unwrapped::<I16F16>::from_bits(0x1234_5678) );
pub fn to_be_bytes(self) -> F::Bytes
[src]
pub fn to_be_bytes(self) -> F::Bytes
[src]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, Unwrapped}; assert_eq!( Unwrapped::<I16F16>::from_bits(0x1234_5678).to_be_bytes(), [0x12, 0x34, 0x56, 0x78] );
pub fn to_le_bytes(self) -> F::Bytes
[src]
pub fn to_le_bytes(self) -> F::Bytes
[src]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, Unwrapped}; assert_eq!( Unwrapped::<I16F16>::from_bits(0x1234_5678).to_le_bytes(), [0x78, 0x56, 0x34, 0x12] );
pub fn to_ne_bytes(self) -> F::Bytes
[src]
pub fn to_ne_bytes(self) -> F::Bytes
[src]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, Unwrapped}; let bytes = if cfg!(target_endian = "big") { [0x12, 0x34, 0x56, 0x78] } else { [0x78, 0x56, 0x34, 0x12] }; assert_eq!( Unwrapped::<I16F16>::from_bits(0x1234_5678).to_ne_bytes(), bytes );
pub fn from_num<Src: ToFixed>(src: Src) -> Unwrapped<F>
[src]
pub fn from_num<Src: ToFixed>(src: Src) -> Unwrapped<F>
[src]Unwrapped 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
f16
,bf16
,f32
,f64
orF128Bits
. 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 returnsUnwrapped(src.unwrapped_to_fixed())
.
See also
FixedI32::unwrapped_from_num
and
FixedU32::unwrapped_from_num
.
Panics
Panics if the value does not fit.
For floating-point numbers, also panics if the value is not finite.
Examples
use fixed::{ types::{I4F4, I16F16}, Unwrapped, }; let src = I16F16::from_num(1.75); let dst = Unwrapped::<I4F4>::from_num(src); assert_eq!(dst, Unwrapped(I4F4::from_num(1.75)));
The following panics even when debug assertions are disabled.
use fixed::{ types::{I4F4, I16F16}, Unwrapped, }; let src = I16F16::from_bits(0x1234_5678); let _overflow = Unwrapped::<I4F4>::from_num(src);
pub fn to_num<Dst: FromFixed>(self) -> Dst
[src]
pub fn to_num<Dst: FromFixed>(self) -> Dst
[src]Converts a fixed-point number to another number, panicking 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
f16
,bf16
,f32
,f64
orF128Bits
. 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::unwrapped_from_fixed(self.0)
.
See also
FixedI32::unwrapped_to_num
and
FixedU32::unwrapped_to_num
.
Examples
use fixed::{ types::{I16F16, I4F4}, Unwrapped, }; let src = Unwrapped(I4F4::from_num(1.75)); assert_eq!(src.to_num::<I16F16>(), I16F16::from_num(1.75));
The following panics even when debug assertions are disabled.
use fixed::{ types::{I2F6, I4F4}, Unwrapped, }; let src = Unwrapped(I4F4::MAX); let _overflow = src.to_num::<I2F6>();
pub fn from_str_binary(src: &str) -> Result<Unwrapped<F>, ParseFixedError>
[src]
pub fn from_str_binary(src: &str) -> Result<Unwrapped<F>, ParseFixedError>
[src]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::from_str_binary
and
FixedU32::from_str_binary
.
Examples
use fixed::{types::I8F8, Unwrapped}; let check = Unwrapped(I8F8::from_bits(0b1110001 << (8 - 1))); assert_eq!(Unwrapped::<I8F8>::from_str_binary("111000.1"), Ok(check));
pub fn from_str_octal(src: &str) -> Result<Unwrapped<F>, ParseFixedError>
[src]
pub fn from_str_octal(src: &str) -> Result<Unwrapped<F>, ParseFixedError>
[src]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::from_str_octal
and
FixedU32::from_str_octal
.
Examples
use fixed::{types::I8F8, Unwrapped}; let check = Unwrapped(I8F8::from_bits(0o1654 << (8 - 3))); assert_eq!(Unwrapped::<I8F8>::from_str_octal("165.4"), Ok(check));
pub fn from_str_hex(src: &str) -> Result<Unwrapped<F>, ParseFixedError>
[src]
pub fn from_str_hex(src: &str) -> Result<Unwrapped<F>, ParseFixedError>
[src]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::from_str_hex
and FixedU32::from_str_hex
.
Examples
use fixed::{types::I8F8, Unwrapped}; let check = Unwrapped(I8F8::from_bits(0xFFE)); assert_eq!(Unwrapped::<I8F8>::from_str_hex("F.FE"), Ok(check));
pub fn int(self) -> Unwrapped<F>
[src]
pub fn int(self) -> Unwrapped<F>
[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, for example for the type
Unwrapped<I0F16>
, where the return
value is always zero.
See also FixedI32::int
and
FixedU32::int
.
Examples
use fixed::{types::I16F16, Unwrapped}; assert_eq!(Unwrapped(I16F16::from_num(12.25)).int(), Unwrapped(I16F16::from_num(12))); assert_eq!(Unwrapped(I16F16::from_num(-12.25)).int(), Unwrapped(I16F16::from_num(-13)));
pub fn frac(self) -> Unwrapped<F>
[src]
pub fn frac(self) -> Unwrapped<F>
[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,
for example for the type
Unwrapped<I0F16>
, where the return
value is always equal to self
.
See also FixedI32::frac
and
FixedU32::frac
.
Examples
use fixed::{types::I16F16, Unwrapped}; assert_eq!(Unwrapped(I16F16::from_num(12.25)).frac(), Unwrapped(I16F16::from_num(0.25))); assert_eq!(Unwrapped(I16F16::from_num(-12.25)).frac(), Unwrapped(I16F16::from_num(0.75)));
pub fn round_to_zero(self) -> Unwrapped<F>
[src]
pub fn round_to_zero(self) -> Unwrapped<F>
[src]Rounds to the next integer towards 0.
See also
FixedI32::round_to_zero
and
FixedU32::round_to_zero
.
Examples
use fixed::{types::I16F16, Unwrapped}; let three = Unwrapped(I16F16::from_num(3)); assert_eq!(Unwrapped(I16F16::from_num(3.9)).round_to_zero(), three); assert_eq!(Unwrapped(I16F16::from_num(-3.9)).round_to_zero(), -three);
pub fn ceil(self) -> Unwrapped<F>
[src]
pub fn ceil(self) -> Unwrapped<F>
[src]Unwrapped ceil. Rounds to the next integer towards +∞, panicking on overflow.
See also
FixedI32::unwrapped_ceil
and
FixedU32::unwrapped_ceil
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; let two_half = Unwrapped(I16F16::from_num(5) / 2); assert_eq!(two_half.ceil(), Unwrapped(I16F16::from_num(3)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let _overflow = Unwrapped(I16F16::MAX).ceil();
pub fn floor(self) -> Unwrapped<F>
[src]
pub fn floor(self) -> Unwrapped<F>
[src]Unwrapped floor. Rounds to the next integer towards −∞, panicking on overflow.
Overflow can only occur for signed numbers with zero integer bits.
See also
FixedI32::unwrapped_floor
and
FixedU32::unwrapped_floor
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; let two_half = Unwrapped(I16F16::from_num(5) / 2); assert_eq!(two_half.floor(), Unwrapped(I16F16::from_num(2)));
The following panics because of overflow.
use fixed::{types::I0F32, Unwrapped}; let _overflow = Unwrapped(I0F32::MIN).floor();
pub fn round(self) -> Unwrapped<F>
[src]
pub fn round(self) -> Unwrapped<F>
[src]Unwrapped round. Rounds to the next integer to the nearest, with ties rounded away from zero, and panics on overflow.
See also
FixedI32::unwrapped_round
and
FixedU32::unwrapped_round
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; let two_half = Unwrapped(I16F16::from_num(5) / 2); assert_eq!(two_half.round(), Unwrapped(I16F16::from_num(3))); assert_eq!((-two_half).round(), Unwrapped(I16F16::from_num(-3)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let _overflow = Unwrapped(I16F16::MAX).round();
pub fn round_ties_to_even(self) -> Unwrapped<F>
[src]
pub fn round_ties_to_even(self) -> Unwrapped<F>
[src]Unwrapped round. Rounds to the next integer to the nearest, with ties rounded to even, and panics on overflow.
See also
FixedI32::unwrapped_round_ties_to_even
and
FixedU32::unwrapped_round_ties_to_even
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; let two_half = Unwrapped(I16F16::from_num(2.5)); assert_eq!(two_half.round_ties_to_even(), Unwrapped(I16F16::from_num(2))); let three_half = Unwrapped(I16F16::from_num(3.5)); assert_eq!(three_half.round_ties_to_even(), Unwrapped(I16F16::from_num(4)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let max = Unwrapped(I16F16::MAX); let _overflow = max.round_ties_to_even();
pub fn count_ones(self) -> u32
[src]
pub fn count_ones(self) -> u32
[src]Returns the number of ones in the binary representation.
See also FixedI32::count_ones
and
FixedU32::count_ones
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x00FF_FF00)); assert_eq!(w.count_ones(), w.0.count_ones());
pub fn count_zeros(self) -> u32
[src]
pub fn count_zeros(self) -> u32
[src]Returns the number of zeros in the binary representation.
See also FixedI32::count_zeros
and FixedU32::count_zeros
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x00FF_FF00)); assert_eq!(w.count_zeros(), w.0.count_zeros());
pub fn leading_ones(self) -> u32
[src]
pub fn leading_ones(self) -> u32
[src]Returns the number of leading ones in the binary representation.
See also FixedI32::leading_ones
and FixedU32::leading_ones
.
Examples
use fixed::{types::U16F16, Unwrapped}; let w = Unwrapped(U16F16::from_bits(0xFF00_00FF)); assert_eq!(w.leading_ones(), w.0.leading_ones());
pub fn leading_zeros(self) -> u32
[src]
pub fn leading_zeros(self) -> u32
[src]Returns the number of leading zeros in the binary representation.
See also
FixedI32::leading_zeros
and
FixedU32::leading_zeros
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x00FF_FF00)); assert_eq!(w.leading_zeros(), w.0.leading_zeros());
pub fn trailing_ones(self) -> u32
[src]
pub fn trailing_ones(self) -> u32
[src]Returns the number of trailing ones in the binary representation.
See also
FixedI32::trailing_ones
and
FixedU32::trailing_ones
.
Examples
use fixed::{types::U16F16, Unwrapped}; let w = Unwrapped(U16F16::from_bits(0xFF00_00FF)); assert_eq!(w.trailing_ones(), w.0.trailing_ones());
pub fn trailing_zeros(self) -> u32
[src]
pub fn trailing_zeros(self) -> u32
[src]Returns the number of trailing zeros in the binary representation.
See also
FixedI32::trailing_zeros
and
FixedU32::trailing_zeros
.
Examples
use fixed::{types::I16F16, Unwrapped}; let w = Unwrapped(I16F16::from_bits(0x00FF_FF00)); assert_eq!(w.trailing_zeros(), w.0.trailing_zeros());
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn reverse_bits(self) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn reverse_bits(self) -> Unwrapped<F>
[src]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, Unwrapped}; let i = I16F16::from_bits(0x1234_5678); assert_eq!(Unwrapped(i).reverse_bits(), Unwrapped(i.reverse_bits()));
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rotate_left(self, n: u32) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rotate_left(self, n: u32) -> Unwrapped<F>
[src]Shifts to the left by n
bits, unwrapped the truncated bits to the right end.
See also FixedI32::rotate_left
and FixedU32::rotate_left
.
Examples
use fixed::{types::I16F16, Unwrapped}; let i = I16F16::from_bits(0x00FF_FF00); assert_eq!(Unwrapped(i).rotate_left(12), Unwrapped(i.rotate_left(12)));
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rotate_right(self, n: u32) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rotate_right(self, n: u32) -> Unwrapped<F>
[src]Shifts to the right by n
bits, unwrapped the truncated bits to the left end.
See also FixedI32::rotate_right
and FixedU32::rotate_right
.
Examples
use fixed::{types::I16F16, Unwrapped}; let i = I16F16::from_bits(0x00FF_FF00); assert_eq!(Unwrapped(i).rotate_right(12), Unwrapped(i.rotate_right(12)));
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn dist(self, other: Unwrapped<F>) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn dist(self, other: Unwrapped<F>) -> Unwrapped<F>
[src]Returns the distance from self
to other
.
See also
FixedI32::unwrapped_dist
and
FixedU32::unwrapped_dist
.
Panics
Panics on overflow.
Examples
use fixed::{types::I16F16, Unwrapped}; type Unwr = Unwrapped<I16F16>; assert_eq!(Unwr::from_num(-1).dist(Unwr::from_num(4)), Unwr::from_num(5));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; type Unwr = Unwrapped<I16F16>; let _overflow = Unwr::MIN.dist(Unwr::ZERO);
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn mean(self, other: Unwrapped<F>) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn mean(self, other: Unwrapped<F>) -> Unwrapped<F>
[src]Returns the mean of self
and other
.
See also FixedI32::mean
and
FixedU32::mean
.
Examples
use fixed::{types::I16F16, Unwrapped}; let three = Unwrapped(I16F16::from_num(3)); let four = Unwrapped(I16F16::from_num(4)); assert_eq!(three.mean(four), Unwrapped(I16F16::from_num(3.5))); assert_eq!(three.mean(-four), Unwrapped(I16F16::from_num(-0.5)));
pub fn recip(self) -> Unwrapped<F>
[src]
pub fn recip(self) -> Unwrapped<F>
[src]Returns the reciprocal (inverse), 1/self
.
See also
FixedI32::unwrapped_recip
and
FixedU32::unwrapped_recip
.
Panics
Panics if self
is zero or on overflow.
Examples
use fixed::{types::I8F24, Unwrapped}; let quarter = Unwrapped(I8F24::from_num(0.25)); assert_eq!(quarter.recip(), Unwrapped(I8F24::from_num(4)));
The following panics because of overflow.
use fixed::{types::I8F24, Unwrapped}; let frac_1_512 = Unwrapped(I8F24::ONE / 512); let _overflow = frac_1_512.recip();
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn mul_add(self, mul: Unwrapped<F>, add: Unwrapped<F>) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn mul_add(self, mul: Unwrapped<F>, add: Unwrapped<F>) -> Unwrapped<F>
[src]Multiply and add. Returns self
× mul
+ add
.
See also
FixedI32::unwrapped_mul_add
and
FixedU32::unwrapped_mul_add
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; let half = Unwrapped(I16F16::from_num(0.5)); let three = Unwrapped(I16F16::from_num(3)); let four = Unwrapped(I16F16::from_num(4)); assert_eq!(three.mul_add(half, four), Unwrapped(I16F16::from_num(5.5))); // max × 1.5 − max = max / 2, which does not overflow let max = Unwrapped(I16F16::MAX); assert_eq!(max.mul_add(Unwrapped(I16F16::from_num(1.5)), -max), max / 2);
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let one = Unwrapped(I16F16::ONE); let max = Unwrapped(I16F16::MAX); let _overflow = max.mul_add(one, one);
pub fn mul_acc(&mut self, a: Unwrapped<F>, b: Unwrapped<F>)
[src]
pub fn mul_acc(&mut self, a: Unwrapped<F>, b: Unwrapped<F>)
[src]Multiply and accumulate. Adds (a
× b
) to self
.
See also
FixedI32::unwrapped_mul_acc
and
FixedU32::unwrapped_mul_acc
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; let mut acc = Unwrapped(I16F16::from_num(3)); acc.mul_acc(Unwrapped(I16F16::from_num(4)), Unwrapped(I16F16::from_num(0.5))); assert_eq!(acc, Unwrapped(I16F16::from_num(5)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let mut acc = Unwrapped(I16F16::MAX); acc.mul_acc(Unwrapped(I16F16::MAX), Unwrapped(I16F16::from_num(3)));
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn div_euclid(self, divisor: Unwrapped<F>) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn div_euclid(self, divisor: Unwrapped<F>) -> Unwrapped<F>
[src]Euclidean division.
See also
FixedI32::unwrapped_div_euclid
and
FixedU32::unwrapped_div_euclid
.
Panics
Panics if the divisor is zero, or if the division results in overflow.
Examples
use fixed::{types::I16F16, Unwrapped}; let num = Unwrapped(I16F16::from_num(7.5)); let den = Unwrapped(I16F16::from_num(2)); assert_eq!(num.div_euclid(den), Unwrapped(I16F16::from_num(3)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let quarter = Unwrapped(I16F16::from_num(0.25)); let _overflow = Unwrapped(I16F16::MAX).div_euclid(quarter);
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rem_euclid(self, divisor: Unwrapped<F>) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rem_euclid(self, divisor: Unwrapped<F>) -> Unwrapped<F>
[src]Remainder for Euclidean division.
See also
FixedI32::unwrapped_rem_euclid
and
FixedU32::unwrapped_rem_euclid
.
Panics
Panics if the divisor is zero.
Examples
use fixed::{types::I16F16, Unwrapped}; let num = Unwrapped(I16F16::from_num(7.5)); let den = Unwrapped(I16F16::from_num(2)); assert_eq!(num.rem_euclid(den), Unwrapped(I16F16::from_num(1.5))); assert_eq!((-num).rem_euclid(den), Unwrapped(I16F16::from_num(0.5)));
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn div_euclid_int(self, divisor: F::Bits) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn div_euclid_int(self, divisor: F::Bits) -> Unwrapped<F>
[src]Euclidean division by an integer.
See also
FixedI32::unwrapped_div_euclid_int
and
FixedU32::unwrapped_div_euclid_int
.
Panics
Panics if the divisor is zero or if the division results in overflow.
Examples
use fixed::{types::I16F16, Unwrapped}; let num = Unwrapped(I16F16::from_num(7.5)); assert_eq!(num.div_euclid_int(2), Unwrapped(I16F16::from_num(3)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let min = Unwrapped(I16F16::MIN); let _overflow = min.div_euclid_int(-1);
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rem_euclid_int(self, divisor: F::Bits) -> Unwrapped<F>
[src]
#[must_use = "this returns the result of the operation, without modifying the original"]pub fn rem_euclid_int(self, divisor: F::Bits) -> Unwrapped<F>
[src]Remainder for Euclidean division.
See also
FixedI32::unwrapped_rem_euclid_int
and
FixedU32::unwrapped_rem_euclid_int
.
Panics
Panics if the divisor is zero.
Examples
use fixed::{types::I16F16, Unwrapped}; let num = Unwrapped(I16F16::from_num(7.5)); assert_eq!(num.rem_euclid_int(2), Unwrapped(I16F16::from_num(1.5))); assert_eq!((-num).rem_euclid_int(2), Unwrapped(I16F16::from_num(0.5)));
The following panics because of overflow.
use fixed::{types::I8F8, Unwrapped}; let num = Unwrapped(I8F8::from_num(-7.5)); // −128 ≤ Fix < 128, so the answer 192.5 overflows let _overflow = num.rem_euclid_int(200);
impl<F: FixedSigned> Unwrapped<F>
[src]
impl<F: FixedSigned> Unwrapped<F>
[src]pub fn signed_bits(self) -> u32
[src]
pub fn signed_bits(self) -> u32
[src]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, Unwrapped}; assert_eq!(Unwrapped(I4F4::from_num(-3)).signed_bits(), 7); // “_101.0000” assert_eq!(Unwrapped(I4F4::from_num(-1)).signed_bits(), 5); // “___1.0000” assert_eq!(Unwrapped(I4F4::from_num(-0.0625)).signed_bits(), 1); // “____.___1” assert_eq!(Unwrapped(I4F4::from_num(0)).signed_bits(), 1); // “____.___0” assert_eq!(Unwrapped(I4F4::from_num(0.0625)).signed_bits(), 2); // “____.__01” assert_eq!(Unwrapped(I4F4::from_num(1)).signed_bits(), 6); // “__01.0000” assert_eq!(Unwrapped(I4F4::from_num(3)).signed_bits(), 7); // “_011.0000”
pub fn is_positive(self) -> bool
[src]
pub fn is_positive(self) -> bool
[src]Returns true
if the number is > 0.
See also FixedI32::is_positive
.
Examples
use fixed::{types::I16F16, Unwrapped}; assert!(Unwrapped(I16F16::from_num(4.3)).is_positive()); assert!(!Unwrapped(I16F16::ZERO).is_positive()); assert!(!Unwrapped(I16F16::from_num(-4.3)).is_positive());
pub fn is_negative(self) -> bool
[src]
pub fn is_negative(self) -> bool
[src]Returns true
if the number is < 0.
See also FixedI32::is_negative
.
Examples
use fixed::{types::I16F16, Unwrapped}; assert!(!Unwrapped(I16F16::from_num(4.3)).is_negative()); assert!(!Unwrapped(I16F16::ZERO).is_negative()); assert!(Unwrapped(I16F16::from_num(-4.3)).is_negative());
pub fn abs(self) -> Unwrapped<F>
[src]
pub fn abs(self) -> Unwrapped<F>
[src]Unwrapped absolute value. Returns the absolute value, panicking on overflow.
Overflow can only occur when trying to find the absolute value of the minimum value.
See also
FixedI32::unwrapped_abs
.
Panics
Panics if the result does not fit.
Examples
use fixed::{types::I16F16, Unwrapped}; assert_eq!(Unwrapped(I16F16::from_num(-5)).abs(), Unwrapped(I16F16::from_num(5)));
The following panics because of overflow.
use fixed::{types::I16F16, Unwrapped}; let _overflow = Unwrapped(I16F16::MIN).abs();
pub fn signum(self) -> Unwrapped<F>
[src]
pub fn signum(self) -> Unwrapped<F>
[src]Returns a number representing the sign of self
.
See also
FixedI32::unwrapped_signum
.
Panics
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.
Examples
use fixed::{types::I16F16, Unwrapped}; assert_eq!(Unwrapped(<I16F16>::from_num(-3.9)).signum(), Unwrapped(I16F16::from_num(-1))); assert_eq!(Unwrapped(<I16F16>::ZERO).signum(), Unwrapped(I16F16::from_num(0))); assert_eq!(Unwrapped(<I16F16>::from_num(3.9)).signum(), Unwrapped(I16F16::ONE));
The following panics because of overflow.
use fixed::{types::I1F31, Unwrapped}; let _overflow = Unwrapped(<I1F31>::from_num(0.5)).signum();
impl<F: FixedUnsigned> Unwrapped<F>
[src]
impl<F: FixedUnsigned> Unwrapped<F>
[src]pub fn significant_bits(self) -> u32
[src]
pub fn significant_bits(self) -> u32
[src]Returns the number of bits required to represent the value.
See also
FixedU32::significant_bits
.
Examples
use fixed::{types::U4F4, Unwrapped}; assert_eq!(Unwrapped(U4F4::from_num(0)).significant_bits(), 0); // “____.____” assert_eq!(Unwrapped(U4F4::from_num(0.0625)).significant_bits(), 1); // “____.___1” assert_eq!(Unwrapped(U4F4::from_num(1)).significant_bits(), 5); // “___1.0000” assert_eq!(Unwrapped(U4F4::from_num(3)).significant_bits(), 6); // “__11.0000”
pub fn is_power_of_two(self) -> bool
[src]
pub fn is_power_of_two(self) -> bool
[src]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, Unwrapped}; assert!(Unwrapped(U16F16::from_num(0.5)).is_power_of_two()); assert!(Unwrapped(U16F16::from_num(4)).is_power_of_two()); assert!(!Unwrapped(U16F16::from_num(5)).is_power_of_two());
pub fn highest_one(self) -> Unwrapped<F>
[src]
pub fn highest_one(self) -> Unwrapped<F>
[src]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, Unwrapped}; type T = Unwrapped<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);
pub fn next_power_of_two(self) -> Unwrapped<F>
[src]
pub fn next_power_of_two(self) -> Unwrapped<F>
[src]Returns the smallest power of two that is ≥ self
.
See also
FixedU32::unwrapped_next_power_of_two
.
Panics
Panics if the next power of two is too large to fit.
Examples
use fixed::{types::U16F16, Unwrapped}; type T = Unwrapped<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));
The following panics because of overflow.
use fixed::{types::U16F16, Unwrapped}; let _overflow = Unwrapped(U16F16::MAX).next_power_of_two();
Trait Implementations
impl<F: Fixed> AddAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> AddAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]fn add_assign(&mut self, other: &Unwrapped<F>)
[src]
fn add_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the +=
operation. Read more
impl<F: Fixed> AddAssign<Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> AddAssign<Unwrapped<F>> for Unwrapped<F>
[src]fn add_assign(&mut self, other: Unwrapped<F>)
[src]
fn add_assign(&mut self, other: Unwrapped<F>)
[src]Performs the +=
operation. Read more
impl<F> BitAndAssign<&'_ Unwrapped<F>> for Unwrapped<F> where
F: BitAndAssign<&'a F>,
[src]
impl<F> BitAndAssign<&'_ Unwrapped<F>> for Unwrapped<F> where
F: BitAndAssign<&'a F>,
[src]fn bitand_assign(&mut self, other: &Unwrapped<F>)
[src]
fn bitand_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the &=
operation. Read more
impl<F> BitAndAssign<Unwrapped<F>> for Unwrapped<F> where
F: BitAndAssign<F>,
[src]
impl<F> BitAndAssign<Unwrapped<F>> for Unwrapped<F> where
F: BitAndAssign<F>,
[src]fn bitand_assign(&mut self, other: Unwrapped<F>)
[src]
fn bitand_assign(&mut self, other: Unwrapped<F>)
[src]Performs the &=
operation. Read more
impl<F> BitOrAssign<&'_ Unwrapped<F>> for Unwrapped<F> where
F: BitOrAssign<&'a F>,
[src]
impl<F> BitOrAssign<&'_ Unwrapped<F>> for Unwrapped<F> where
F: BitOrAssign<&'a F>,
[src]fn bitor_assign(&mut self, other: &Unwrapped<F>)
[src]
fn bitor_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the |=
operation. Read more
impl<F> BitOrAssign<Unwrapped<F>> for Unwrapped<F> where
F: BitOrAssign<F>,
[src]
impl<F> BitOrAssign<Unwrapped<F>> for Unwrapped<F> where
F: BitOrAssign<F>,
[src]fn bitor_assign(&mut self, other: Unwrapped<F>)
[src]
fn bitor_assign(&mut self, other: Unwrapped<F>)
[src]Performs the |=
operation. Read more
impl<F> BitXorAssign<&'_ Unwrapped<F>> for Unwrapped<F> where
F: BitXorAssign<&'a F>,
[src]
impl<F> BitXorAssign<&'_ Unwrapped<F>> for Unwrapped<F> where
F: BitXorAssign<&'a F>,
[src]fn bitxor_assign(&mut self, other: &Unwrapped<F>)
[src]
fn bitxor_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the ^=
operation. Read more
impl<F> BitXorAssign<Unwrapped<F>> for Unwrapped<F> where
F: BitXorAssign<F>,
[src]
impl<F> BitXorAssign<Unwrapped<F>> for Unwrapped<F> where
F: BitXorAssign<F>,
[src]fn bitxor_assign(&mut self, other: Unwrapped<F>)
[src]
fn bitxor_assign(&mut self, other: Unwrapped<F>)
[src]Performs the ^=
operation. Read more
impl<'de, Frac: LeEqU8> Deserialize<'de> for Unwrapped<FixedI8<Frac>>
[src]
impl<'de, Frac: LeEqU8> Deserialize<'de> for Unwrapped<FixedI8<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU16> Deserialize<'de> for Unwrapped<FixedI16<Frac>>
[src]
impl<'de, Frac: LeEqU16> Deserialize<'de> for Unwrapped<FixedI16<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU32> Deserialize<'de> for Unwrapped<FixedI32<Frac>>
[src]
impl<'de, Frac: LeEqU32> Deserialize<'de> for Unwrapped<FixedI32<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU64> Deserialize<'de> for Unwrapped<FixedI64<Frac>>
[src]
impl<'de, Frac: LeEqU64> Deserialize<'de> for Unwrapped<FixedI64<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU128> Deserialize<'de> for Unwrapped<FixedI128<Frac>>
[src]
impl<'de, Frac: LeEqU128> Deserialize<'de> for Unwrapped<FixedI128<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU8> Deserialize<'de> for Unwrapped<FixedU8<Frac>>
[src]
impl<'de, Frac: LeEqU8> Deserialize<'de> for Unwrapped<FixedU8<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU16> Deserialize<'de> for Unwrapped<FixedU16<Frac>>
[src]
impl<'de, Frac: LeEqU16> Deserialize<'de> for Unwrapped<FixedU16<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU32> Deserialize<'de> for Unwrapped<FixedU32<Frac>>
[src]
impl<'de, Frac: LeEqU32> Deserialize<'de> for Unwrapped<FixedU32<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU64> Deserialize<'de> for Unwrapped<FixedU64<Frac>>
[src]
impl<'de, Frac: LeEqU64> Deserialize<'de> for Unwrapped<FixedU64<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<'de, Frac: LeEqU128> Deserialize<'de> for Unwrapped<FixedU128<Frac>>
[src]
impl<'de, Frac: LeEqU128> Deserialize<'de> for Unwrapped<FixedU128<Frac>>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<F: Fixed> DivAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> DivAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]fn div_assign(&mut self, other: &Unwrapped<F>)
[src]
fn div_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ i128> for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac> DivAssign<&'_ i128> for Unwrapped<FixedI128<Frac>>
[src]fn div_assign(&mut self, other: &i128)
[src]
fn div_assign(&mut self, other: &i128)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ i16> for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac> DivAssign<&'_ i16> for Unwrapped<FixedI16<Frac>>
[src]fn div_assign(&mut self, other: &i16)
[src]
fn div_assign(&mut self, other: &i16)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ i32> for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac> DivAssign<&'_ i32> for Unwrapped<FixedI32<Frac>>
[src]fn div_assign(&mut self, other: &i32)
[src]
fn div_assign(&mut self, other: &i32)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ i64> for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac> DivAssign<&'_ i64> for Unwrapped<FixedI64<Frac>>
[src]fn div_assign(&mut self, other: &i64)
[src]
fn div_assign(&mut self, other: &i64)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ i8> for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac> DivAssign<&'_ i8> for Unwrapped<FixedI8<Frac>>
[src]fn div_assign(&mut self, other: &i8)
[src]
fn div_assign(&mut self, other: &i8)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ u128> for Unwrapped<FixedU128<Frac>>
[src]
impl<Frac> DivAssign<&'_ u128> for Unwrapped<FixedU128<Frac>>
[src]fn div_assign(&mut self, other: &u128)
[src]
fn div_assign(&mut self, other: &u128)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ u16> for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac> DivAssign<&'_ u16> for Unwrapped<FixedU16<Frac>>
[src]fn div_assign(&mut self, other: &u16)
[src]
fn div_assign(&mut self, other: &u16)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ u32> for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac> DivAssign<&'_ u32> for Unwrapped<FixedU32<Frac>>
[src]fn div_assign(&mut self, other: &u32)
[src]
fn div_assign(&mut self, other: &u32)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ u64> for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac> DivAssign<&'_ u64> for Unwrapped<FixedU64<Frac>>
[src]fn div_assign(&mut self, other: &u64)
[src]
fn div_assign(&mut self, other: &u64)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<&'_ u8> for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac> DivAssign<&'_ u8> for Unwrapped<FixedU8<Frac>>
[src]fn div_assign(&mut self, other: &u8)
[src]
fn div_assign(&mut self, other: &u8)
[src]Performs the /=
operation. Read more
impl<F: Fixed> DivAssign<Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> DivAssign<Unwrapped<F>> for Unwrapped<F>
[src]fn div_assign(&mut self, other: Unwrapped<F>)
[src]
fn div_assign(&mut self, other: Unwrapped<F>)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<i128> for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac> DivAssign<i128> for Unwrapped<FixedI128<Frac>>
[src]fn div_assign(&mut self, other: i128)
[src]
fn div_assign(&mut self, other: i128)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<i16> for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac> DivAssign<i16> for Unwrapped<FixedI16<Frac>>
[src]fn div_assign(&mut self, other: i16)
[src]
fn div_assign(&mut self, other: i16)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<i32> for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac> DivAssign<i32> for Unwrapped<FixedI32<Frac>>
[src]fn div_assign(&mut self, other: i32)
[src]
fn div_assign(&mut self, other: i32)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<i64> for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac> DivAssign<i64> for Unwrapped<FixedI64<Frac>>
[src]fn div_assign(&mut self, other: i64)
[src]
fn div_assign(&mut self, other: i64)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<i8> for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac> DivAssign<i8> for Unwrapped<FixedI8<Frac>>
[src]fn div_assign(&mut self, other: i8)
[src]
fn div_assign(&mut self, other: i8)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<u128> for Unwrapped<FixedU128<Frac>>
[src]
impl<Frac> DivAssign<u128> for Unwrapped<FixedU128<Frac>>
[src]fn div_assign(&mut self, other: u128)
[src]
fn div_assign(&mut self, other: u128)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<u16> for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac> DivAssign<u16> for Unwrapped<FixedU16<Frac>>
[src]fn div_assign(&mut self, other: u16)
[src]
fn div_assign(&mut self, other: u16)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<u32> for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac> DivAssign<u32> for Unwrapped<FixedU32<Frac>>
[src]fn div_assign(&mut self, other: u32)
[src]
fn div_assign(&mut self, other: u32)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<u64> for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac> DivAssign<u64> for Unwrapped<FixedU64<Frac>>
[src]fn div_assign(&mut self, other: u64)
[src]
fn div_assign(&mut self, other: u64)
[src]Performs the /=
operation. Read more
impl<Frac> DivAssign<u8> for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac> DivAssign<u8> for Unwrapped<FixedU8<Frac>>
[src]fn div_assign(&mut self, other: u8)
[src]
fn div_assign(&mut self, other: u8)
[src]Performs the /=
operation. Read more
impl<F: Fixed> MulAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> MulAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]fn mul_assign(&mut self, other: &Unwrapped<F>)
[src]
fn mul_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ i128> for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac> MulAssign<&'_ i128> for Unwrapped<FixedI128<Frac>>
[src]fn mul_assign(&mut self, other: &i128)
[src]
fn mul_assign(&mut self, other: &i128)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ i16> for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac> MulAssign<&'_ i16> for Unwrapped<FixedI16<Frac>>
[src]fn mul_assign(&mut self, other: &i16)
[src]
fn mul_assign(&mut self, other: &i16)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ i32> for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac> MulAssign<&'_ i32> for Unwrapped<FixedI32<Frac>>
[src]fn mul_assign(&mut self, other: &i32)
[src]
fn mul_assign(&mut self, other: &i32)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ i64> for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac> MulAssign<&'_ i64> for Unwrapped<FixedI64<Frac>>
[src]fn mul_assign(&mut self, other: &i64)
[src]
fn mul_assign(&mut self, other: &i64)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ i8> for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac> MulAssign<&'_ i8> for Unwrapped<FixedI8<Frac>>
[src]fn mul_assign(&mut self, other: &i8)
[src]
fn mul_assign(&mut self, other: &i8)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ u128> for Unwrapped<FixedU128<Frac>>
[src]
impl<Frac> MulAssign<&'_ u128> for Unwrapped<FixedU128<Frac>>
[src]fn mul_assign(&mut self, other: &u128)
[src]
fn mul_assign(&mut self, other: &u128)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ u16> for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac> MulAssign<&'_ u16> for Unwrapped<FixedU16<Frac>>
[src]fn mul_assign(&mut self, other: &u16)
[src]
fn mul_assign(&mut self, other: &u16)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ u32> for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac> MulAssign<&'_ u32> for Unwrapped<FixedU32<Frac>>
[src]fn mul_assign(&mut self, other: &u32)
[src]
fn mul_assign(&mut self, other: &u32)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ u64> for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac> MulAssign<&'_ u64> for Unwrapped<FixedU64<Frac>>
[src]fn mul_assign(&mut self, other: &u64)
[src]
fn mul_assign(&mut self, other: &u64)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<&'_ u8> for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac> MulAssign<&'_ u8> for Unwrapped<FixedU8<Frac>>
[src]fn mul_assign(&mut self, other: &u8)
[src]
fn mul_assign(&mut self, other: &u8)
[src]Performs the *=
operation. Read more
impl<F: Fixed> MulAssign<Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> MulAssign<Unwrapped<F>> for Unwrapped<F>
[src]fn mul_assign(&mut self, other: Unwrapped<F>)
[src]
fn mul_assign(&mut self, other: Unwrapped<F>)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<i128> for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac> MulAssign<i128> for Unwrapped<FixedI128<Frac>>
[src]fn mul_assign(&mut self, other: i128)
[src]
fn mul_assign(&mut self, other: i128)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<i16> for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac> MulAssign<i16> for Unwrapped<FixedI16<Frac>>
[src]fn mul_assign(&mut self, other: i16)
[src]
fn mul_assign(&mut self, other: i16)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<i32> for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac> MulAssign<i32> for Unwrapped<FixedI32<Frac>>
[src]fn mul_assign(&mut self, other: i32)
[src]
fn mul_assign(&mut self, other: i32)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<i64> for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac> MulAssign<i64> for Unwrapped<FixedI64<Frac>>
[src]fn mul_assign(&mut self, other: i64)
[src]
fn mul_assign(&mut self, other: i64)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<i8> for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac> MulAssign<i8> for Unwrapped<FixedI8<Frac>>
[src]fn mul_assign(&mut self, other: i8)
[src]
fn mul_assign(&mut self, other: i8)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<u128> for Unwrapped<FixedU128<Frac>>
[src]
impl<Frac> MulAssign<u128> for Unwrapped<FixedU128<Frac>>
[src]fn mul_assign(&mut self, other: u128)
[src]
fn mul_assign(&mut self, other: u128)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<u16> for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac> MulAssign<u16> for Unwrapped<FixedU16<Frac>>
[src]fn mul_assign(&mut self, other: u16)
[src]
fn mul_assign(&mut self, other: u16)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<u32> for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac> MulAssign<u32> for Unwrapped<FixedU32<Frac>>
[src]fn mul_assign(&mut self, other: u32)
[src]
fn mul_assign(&mut self, other: u32)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<u64> for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac> MulAssign<u64> for Unwrapped<FixedU64<Frac>>
[src]fn mul_assign(&mut self, other: u64)
[src]
fn mul_assign(&mut self, other: u64)
[src]Performs the *=
operation. Read more
impl<Frac> MulAssign<u8> for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac> MulAssign<u8> for Unwrapped<FixedU8<Frac>>
[src]fn mul_assign(&mut self, other: u8)
[src]
fn mul_assign(&mut self, other: u8)
[src]Performs the *=
operation. Read more
impl<F: Ord> Ord for Unwrapped<F>
[src]
impl<F: Ord> Ord for Unwrapped<F>
[src]impl<F: PartialOrd> PartialOrd<Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: PartialOrd> PartialOrd<Unwrapped<F>> for Unwrapped<F>
[src]fn partial_cmp(&self, other: &Unwrapped<F>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Unwrapped<F>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<F: Fixed> RemAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> RemAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]fn rem_assign(&mut self, other: &Unwrapped<F>)
[src]
fn rem_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU128> RemAssign<&'_ i128> for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac: LeEqU128> RemAssign<&'_ i128> for Unwrapped<FixedI128<Frac>>
[src]fn rem_assign(&mut self, other: &i128)
[src]
fn rem_assign(&mut self, other: &i128)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU16> RemAssign<&'_ i16> for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac: LeEqU16> RemAssign<&'_ i16> for Unwrapped<FixedI16<Frac>>
[src]fn rem_assign(&mut self, other: &i16)
[src]
fn rem_assign(&mut self, other: &i16)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU32> RemAssign<&'_ i32> for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac: LeEqU32> RemAssign<&'_ i32> for Unwrapped<FixedI32<Frac>>
[src]fn rem_assign(&mut self, other: &i32)
[src]
fn rem_assign(&mut self, other: &i32)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU64> RemAssign<&'_ i64> for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac: LeEqU64> RemAssign<&'_ i64> for Unwrapped<FixedI64<Frac>>
[src]fn rem_assign(&mut self, other: &i64)
[src]
fn rem_assign(&mut self, other: &i64)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU8> RemAssign<&'_ i8> for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac: LeEqU8> RemAssign<&'_ i8> for Unwrapped<FixedI8<Frac>>
[src]fn rem_assign(&mut self, other: &i8)
[src]
fn rem_assign(&mut self, other: &i8)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU128> RemAssign<&'_ u128> for Unwrapped<FixedU128<Frac>>
[src]
impl<Frac: LeEqU128> RemAssign<&'_ u128> for Unwrapped<FixedU128<Frac>>
[src]fn rem_assign(&mut self, other: &u128)
[src]
fn rem_assign(&mut self, other: &u128)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU16> RemAssign<&'_ u16> for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac: LeEqU16> RemAssign<&'_ u16> for Unwrapped<FixedU16<Frac>>
[src]fn rem_assign(&mut self, other: &u16)
[src]
fn rem_assign(&mut self, other: &u16)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU32> RemAssign<&'_ u32> for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac: LeEqU32> RemAssign<&'_ u32> for Unwrapped<FixedU32<Frac>>
[src]fn rem_assign(&mut self, other: &u32)
[src]
fn rem_assign(&mut self, other: &u32)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU64> RemAssign<&'_ u64> for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac: LeEqU64> RemAssign<&'_ u64> for Unwrapped<FixedU64<Frac>>
[src]fn rem_assign(&mut self, other: &u64)
[src]
fn rem_assign(&mut self, other: &u64)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU8> RemAssign<&'_ u8> for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac: LeEqU8> RemAssign<&'_ u8> for Unwrapped<FixedU8<Frac>>
[src]fn rem_assign(&mut self, other: &u8)
[src]
fn rem_assign(&mut self, other: &u8)
[src]Performs the %=
operation. Read more
impl<F: Fixed> RemAssign<Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> RemAssign<Unwrapped<F>> for Unwrapped<F>
[src]fn rem_assign(&mut self, other: Unwrapped<F>)
[src]
fn rem_assign(&mut self, other: Unwrapped<F>)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU128> RemAssign<i128> for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac: LeEqU128> RemAssign<i128> for Unwrapped<FixedI128<Frac>>
[src]fn rem_assign(&mut self, other: i128)
[src]
fn rem_assign(&mut self, other: i128)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU16> RemAssign<i16> for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac: LeEqU16> RemAssign<i16> for Unwrapped<FixedI16<Frac>>
[src]fn rem_assign(&mut self, other: i16)
[src]
fn rem_assign(&mut self, other: i16)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU32> RemAssign<i32> for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac: LeEqU32> RemAssign<i32> for Unwrapped<FixedI32<Frac>>
[src]fn rem_assign(&mut self, other: i32)
[src]
fn rem_assign(&mut self, other: i32)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU64> RemAssign<i64> for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac: LeEqU64> RemAssign<i64> for Unwrapped<FixedI64<Frac>>
[src]fn rem_assign(&mut self, other: i64)
[src]
fn rem_assign(&mut self, other: i64)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU8> RemAssign<i8> for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac: LeEqU8> RemAssign<i8> for Unwrapped<FixedI8<Frac>>
[src]fn rem_assign(&mut self, other: i8)
[src]
fn rem_assign(&mut self, other: i8)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU128> RemAssign<u128> for Unwrapped<FixedU128<Frac>>
[src]
impl<Frac: LeEqU128> RemAssign<u128> for Unwrapped<FixedU128<Frac>>
[src]fn rem_assign(&mut self, other: u128)
[src]
fn rem_assign(&mut self, other: u128)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU16> RemAssign<u16> for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac: LeEqU16> RemAssign<u16> for Unwrapped<FixedU16<Frac>>
[src]fn rem_assign(&mut self, other: u16)
[src]
fn rem_assign(&mut self, other: u16)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU32> RemAssign<u32> for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac: LeEqU32> RemAssign<u32> for Unwrapped<FixedU32<Frac>>
[src]fn rem_assign(&mut self, other: u32)
[src]
fn rem_assign(&mut self, other: u32)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU64> RemAssign<u64> for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac: LeEqU64> RemAssign<u64> for Unwrapped<FixedU64<Frac>>
[src]fn rem_assign(&mut self, other: u64)
[src]
fn rem_assign(&mut self, other: u64)
[src]Performs the %=
operation. Read more
impl<Frac: LeEqU8> RemAssign<u8> for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac: LeEqU8> RemAssign<u8> for Unwrapped<FixedU8<Frac>>
[src]fn rem_assign(&mut self, other: u8)
[src]
fn rem_assign(&mut self, other: u8)
[src]Performs the %=
operation. Read more
impl<F> ShlAssign<&'_ i128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ i128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &i128)
[src]
fn shl_assign(&mut self, other: &i128)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ i16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ i16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &i16)
[src]
fn shl_assign(&mut self, other: &i16)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ i32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ i32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &i32)
[src]
fn shl_assign(&mut self, other: &i32)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ i64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ i64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &i64)
[src]
fn shl_assign(&mut self, other: &i64)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ i8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ i8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &i8)
[src]
fn shl_assign(&mut self, other: &i8)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ isize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ isize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &isize)
[src]
fn shl_assign(&mut self, other: &isize)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ u128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ u128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &u128)
[src]
fn shl_assign(&mut self, other: &u128)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ u16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ u16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &u16)
[src]
fn shl_assign(&mut self, other: &u16)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ u32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ u32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &u32)
[src]
fn shl_assign(&mut self, other: &u32)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ u64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ u64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &u64)
[src]
fn shl_assign(&mut self, other: &u64)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ u8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ u8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &u8)
[src]
fn shl_assign(&mut self, other: &u8)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<&'_ usize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<&'_ usize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: &usize)
[src]
fn shl_assign(&mut self, other: &usize)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<i128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<i128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: i128)
[src]
fn shl_assign(&mut self, other: i128)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<i16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<i16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: i16)
[src]
fn shl_assign(&mut self, other: i16)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<i32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<i32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: i32)
[src]
fn shl_assign(&mut self, other: i32)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<i64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<i64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: i64)
[src]
fn shl_assign(&mut self, other: i64)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<i8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<i8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: i8)
[src]
fn shl_assign(&mut self, other: i8)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<isize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<isize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: isize)
[src]
fn shl_assign(&mut self, other: isize)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<u128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<u128> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: u128)
[src]
fn shl_assign(&mut self, other: u128)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<u16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<u16> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: u16)
[src]
fn shl_assign(&mut self, other: u16)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<u32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<u32> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: u32)
[src]
fn shl_assign(&mut self, other: u32)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<u64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<u64> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: u64)
[src]
fn shl_assign(&mut self, other: u64)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<u8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<u8> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: u8)
[src]
fn shl_assign(&mut self, other: u8)
[src]Performs the <<=
operation. Read more
impl<F> ShlAssign<usize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]
impl<F> ShlAssign<usize> for Unwrapped<F> where
F: ShlAssign<u32>,
[src]fn shl_assign(&mut self, other: usize)
[src]
fn shl_assign(&mut self, other: usize)
[src]Performs the <<=
operation. Read more
impl<F> ShrAssign<&'_ i128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ i128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &i128)
[src]
fn shr_assign(&mut self, other: &i128)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ i16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ i16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &i16)
[src]
fn shr_assign(&mut self, other: &i16)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ i32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ i32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &i32)
[src]
fn shr_assign(&mut self, other: &i32)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ i64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ i64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &i64)
[src]
fn shr_assign(&mut self, other: &i64)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ i8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ i8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &i8)
[src]
fn shr_assign(&mut self, other: &i8)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ isize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ isize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &isize)
[src]
fn shr_assign(&mut self, other: &isize)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ u128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ u128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &u128)
[src]
fn shr_assign(&mut self, other: &u128)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ u16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ u16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &u16)
[src]
fn shr_assign(&mut self, other: &u16)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ u32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ u32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &u32)
[src]
fn shr_assign(&mut self, other: &u32)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ u64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ u64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &u64)
[src]
fn shr_assign(&mut self, other: &u64)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ u8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ u8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &u8)
[src]
fn shr_assign(&mut self, other: &u8)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<&'_ usize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<&'_ usize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: &usize)
[src]
fn shr_assign(&mut self, other: &usize)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<i128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<i128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: i128)
[src]
fn shr_assign(&mut self, other: i128)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<i16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<i16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: i16)
[src]
fn shr_assign(&mut self, other: i16)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<i32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<i32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: i32)
[src]
fn shr_assign(&mut self, other: i32)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<i64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<i64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: i64)
[src]
fn shr_assign(&mut self, other: i64)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<i8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<i8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: i8)
[src]
fn shr_assign(&mut self, other: i8)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<isize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<isize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: isize)
[src]
fn shr_assign(&mut self, other: isize)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<u128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<u128> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: u128)
[src]
fn shr_assign(&mut self, other: u128)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<u16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<u16> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: u16)
[src]
fn shr_assign(&mut self, other: u16)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<u32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<u32> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: u32)
[src]
fn shr_assign(&mut self, other: u32)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<u64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<u64> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: u64)
[src]
fn shr_assign(&mut self, other: u64)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<u8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<u8> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: u8)
[src]
fn shr_assign(&mut self, other: u8)
[src]Performs the >>=
operation. Read more
impl<F> ShrAssign<usize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]
impl<F> ShrAssign<usize> for Unwrapped<F> where
F: ShrAssign<u32>,
[src]fn shr_assign(&mut self, other: usize)
[src]
fn shr_assign(&mut self, other: usize)
[src]Performs the >>=
operation. Read more
impl<F: Fixed> SubAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> SubAssign<&'_ Unwrapped<F>> for Unwrapped<F>
[src]fn sub_assign(&mut self, other: &Unwrapped<F>)
[src]
fn sub_assign(&mut self, other: &Unwrapped<F>)
[src]Performs the -=
operation. Read more
impl<F: Fixed> SubAssign<Unwrapped<F>> for Unwrapped<F>
[src]
impl<F: Fixed> SubAssign<Unwrapped<F>> for Unwrapped<F>
[src]fn sub_assign(&mut self, other: Unwrapped<F>)
[src]
fn sub_assign(&mut self, other: Unwrapped<F>)
[src]Performs the -=
operation. Read more
impl<F: Copy> Copy for Unwrapped<F>
[src]
impl<F: Eq> Eq for Unwrapped<F>
[src]
impl<Frac: LeEqU8> Pod for Unwrapped<FixedI8<Frac>>
[src]
impl<Frac: LeEqU16> Pod for Unwrapped<FixedI16<Frac>>
[src]
impl<Frac: LeEqU32> Pod for Unwrapped<FixedI32<Frac>>
[src]
impl<Frac: LeEqU64> Pod for Unwrapped<FixedI64<Frac>>
[src]
impl<Frac: LeEqU128> Pod for Unwrapped<FixedI128<Frac>>
[src]
impl<Frac: LeEqU8> Pod for Unwrapped<FixedU8<Frac>>
[src]
impl<Frac: LeEqU16> Pod for Unwrapped<FixedU16<Frac>>
[src]
impl<Frac: LeEqU32> Pod for Unwrapped<FixedU32<Frac>>
[src]
impl<Frac: LeEqU64> Pod for Unwrapped<FixedU64<Frac>>
[src]
impl<Frac: LeEqU128> Pod for Unwrapped<FixedU128<Frac>>
[src]
impl<F> StructuralEq for Unwrapped<F>
[src]
impl<F> StructuralPartialEq for Unwrapped<F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for Unwrapped<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for Unwrapped<F> where
F: Send,
F: Send,
impl<F> Sync for Unwrapped<F> where
F: Sync,
F: Sync,
impl<F> Unpin for Unwrapped<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for Unwrapped<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CheckedAs for T
[src]
impl<T> CheckedAs for T
[src]pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]Casts the value.
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]pub fn lossless_try_into(Self) -> Option<Dst>
[src]
pub fn lossless_try_into(Self) -> Option<Dst>
[src]Performs the conversion.
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]pub fn lossy_into(Self) -> Dst
[src]
pub fn lossy_into(Self) -> Dst
[src]Performs the conversion.
impl<T> OverflowingAs for T
[src]
impl<T> OverflowingAs for T
[src]pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]Casts the value.
impl<T> SaturatingAs for T
[src]
impl<T> SaturatingAs for T
[src]pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]Casts the value.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> UnwrappedAs for T
[src]
impl<T> UnwrappedAs for T
[src]pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]Casts the value.
impl<T> WrappingAs for T
[src]
impl<T> WrappingAs for T
[src]pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]Casts the value.
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
[src]
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,