Struct az::Round

source ·
#[repr(transparent)]
pub struct Round<T>(pub T);
Expand description

Used to convert floating-point numbers to integers with rounding to the nearest, with ties rounded to even.

The underlying value can be retrieved through the .0 index.

§Examples

use az::Round;
assert_eq!(az::cast::<_, i32>(Round(0.4)), 0);
assert_eq!(az::cast::<_, i32>(Round(0.6)), 1);
// ties rounded to even
assert_eq!(az::cast::<_, i32>(Round(-0.5)), 0);
assert_eq!(az::cast::<_, i32>(Round(-1.5)), -2);

Tuple Fields§

§0: T

Trait Implementations§

source§

impl Cast<Wrapping<i128>> for Round<f32>

source§

fn cast(self) -> Wrapping<i128>

Casts the value.
source§

impl Cast<Wrapping<i128>> for Round<f64>

source§

fn cast(self) -> Wrapping<i128>

Casts the value.
source§

impl Cast<Wrapping<i16>> for Round<f32>

source§

fn cast(self) -> Wrapping<i16>

Casts the value.
source§

impl Cast<Wrapping<i16>> for Round<f64>

source§

fn cast(self) -> Wrapping<i16>

Casts the value.
source§

impl Cast<Wrapping<i32>> for Round<f32>

source§

fn cast(self) -> Wrapping<i32>

Casts the value.
source§

impl Cast<Wrapping<i32>> for Round<f64>

source§

fn cast(self) -> Wrapping<i32>

Casts the value.
source§

impl Cast<Wrapping<i64>> for Round<f32>

source§

fn cast(self) -> Wrapping<i64>

Casts the value.
source§

impl Cast<Wrapping<i64>> for Round<f64>

source§

fn cast(self) -> Wrapping<i64>

Casts the value.
source§

impl Cast<Wrapping<i8>> for Round<f32>

source§

fn cast(self) -> Wrapping<i8>

Casts the value.
source§

impl Cast<Wrapping<i8>> for Round<f64>

source§

fn cast(self) -> Wrapping<i8>

Casts the value.
source§

impl Cast<Wrapping<isize>> for Round<f32>

source§

fn cast(self) -> Wrapping<isize>

Casts the value.
source§

impl Cast<Wrapping<isize>> for Round<f64>

source§

fn cast(self) -> Wrapping<isize>

Casts the value.
source§

impl Cast<Wrapping<u128>> for Round<f32>

source§

fn cast(self) -> Wrapping<u128>

Casts the value.
source§

impl Cast<Wrapping<u128>> for Round<f64>

source§

fn cast(self) -> Wrapping<u128>

Casts the value.
source§

impl Cast<Wrapping<u16>> for Round<f32>

source§

fn cast(self) -> Wrapping<u16>

Casts the value.
source§

impl Cast<Wrapping<u16>> for Round<f64>

source§

fn cast(self) -> Wrapping<u16>

Casts the value.
source§

impl Cast<Wrapping<u32>> for Round<f32>

source§

fn cast(self) -> Wrapping<u32>

Casts the value.
source§

impl Cast<Wrapping<u32>> for Round<f64>

source§

fn cast(self) -> Wrapping<u32>

Casts the value.
source§

impl Cast<Wrapping<u64>> for Round<f32>

source§

fn cast(self) -> Wrapping<u64>

Casts the value.
source§

impl Cast<Wrapping<u64>> for Round<f64>

source§

fn cast(self) -> Wrapping<u64>

Casts the value.
source§

impl Cast<Wrapping<u8>> for Round<f32>

source§

fn cast(self) -> Wrapping<u8>

Casts the value.
source§

impl Cast<Wrapping<u8>> for Round<f64>

source§

fn cast(self) -> Wrapping<u8>

Casts the value.
source§

impl Cast<Wrapping<usize>> for Round<f32>

source§

fn cast(self) -> Wrapping<usize>

Casts the value.
source§

impl Cast<Wrapping<usize>> for Round<f64>

source§

fn cast(self) -> Wrapping<usize>

Casts the value.
source§

impl Cast<i128> for Round<f32>

source§

fn cast(self) -> i128

Casts the value.
source§

impl Cast<i128> for Round<f64>

source§

fn cast(self) -> i128

Casts the value.
source§

impl Cast<i16> for Round<f32>

source§

fn cast(self) -> i16

Casts the value.
source§

impl Cast<i16> for Round<f64>

source§

fn cast(self) -> i16

Casts the value.
source§

impl Cast<i32> for Round<f32>

source§

fn cast(self) -> i32

Casts the value.
source§

impl Cast<i32> for Round<f64>

source§

fn cast(self) -> i32

Casts the value.
source§

impl Cast<i64> for Round<f32>

source§

fn cast(self) -> i64

Casts the value.
source§

impl Cast<i64> for Round<f64>

source§

fn cast(self) -> i64

Casts the value.
source§

impl Cast<i8> for Round<f32>

source§

fn cast(self) -> i8

Casts the value.
source§

impl Cast<i8> for Round<f64>

source§

fn cast(self) -> i8

Casts the value.
source§

impl Cast<isize> for Round<f32>

source§

fn cast(self) -> isize

Casts the value.
source§

impl Cast<isize> for Round<f64>

source§

fn cast(self) -> isize

Casts the value.
source§

impl Cast<u128> for Round<f32>

source§

fn cast(self) -> u128

Casts the value.
source§

impl Cast<u128> for Round<f64>

source§

fn cast(self) -> u128

Casts the value.
source§

impl Cast<u16> for Round<f32>

source§

fn cast(self) -> u16

Casts the value.
source§

impl Cast<u16> for Round<f64>

source§

fn cast(self) -> u16

Casts the value.
source§

impl Cast<u32> for Round<f32>

source§

fn cast(self) -> u32

Casts the value.
source§

impl Cast<u32> for Round<f64>

source§

fn cast(self) -> u32

Casts the value.
source§

impl Cast<u64> for Round<f32>

source§

fn cast(self) -> u64

Casts the value.
source§

impl Cast<u64> for Round<f64>

source§

fn cast(self) -> u64

Casts the value.
source§

impl Cast<u8> for Round<f32>

source§

fn cast(self) -> u8

Casts the value.
source§

impl Cast<u8> for Round<f64>

source§

fn cast(self) -> u8

Casts the value.
source§

impl Cast<usize> for Round<f32>

source§

fn cast(self) -> usize

Casts the value.
source§

impl Cast<usize> for Round<f64>

source§

fn cast(self) -> usize

Casts the value.
source§

impl CheckedCast<Wrapping<i128>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<i128>>

Casts the value.
source§

impl CheckedCast<Wrapping<i128>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<i128>>

Casts the value.
source§

impl CheckedCast<Wrapping<i16>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<i16>>

Casts the value.
source§

impl CheckedCast<Wrapping<i16>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<i16>>

Casts the value.
source§

impl CheckedCast<Wrapping<i32>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<i32>>

Casts the value.
source§

impl CheckedCast<Wrapping<i32>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<i32>>

Casts the value.
source§

impl CheckedCast<Wrapping<i64>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<i64>>

Casts the value.
source§

impl CheckedCast<Wrapping<i64>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<i64>>

Casts the value.
source§

impl CheckedCast<Wrapping<i8>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<i8>>

Casts the value.
source§

impl CheckedCast<Wrapping<i8>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<i8>>

Casts the value.
source§

impl CheckedCast<Wrapping<isize>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<isize>>

Casts the value.
source§

impl CheckedCast<Wrapping<isize>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<isize>>

Casts the value.
source§

impl CheckedCast<Wrapping<u128>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<u128>>

Casts the value.
source§

impl CheckedCast<Wrapping<u128>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<u128>>

Casts the value.
source§

impl CheckedCast<Wrapping<u16>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<u16>>

Casts the value.
source§

impl CheckedCast<Wrapping<u16>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<u16>>

Casts the value.
source§

impl CheckedCast<Wrapping<u32>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<u32>>

Casts the value.
source§

impl CheckedCast<Wrapping<u32>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<u32>>

Casts the value.
source§

impl CheckedCast<Wrapping<u64>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<u64>>

Casts the value.
source§

impl CheckedCast<Wrapping<u64>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<u64>>

Casts the value.
source§

impl CheckedCast<Wrapping<u8>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<u8>>

Casts the value.
source§

impl CheckedCast<Wrapping<u8>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<u8>>

Casts the value.
source§

impl CheckedCast<Wrapping<usize>> for Round<f32>

source§

fn checked_cast(self) -> Option<Wrapping<usize>>

Casts the value.
source§

impl CheckedCast<Wrapping<usize>> for Round<f64>

source§

fn checked_cast(self) -> Option<Wrapping<usize>>

Casts the value.
source§

impl CheckedCast<i128> for Round<f32>

source§

fn checked_cast(self) -> Option<i128>

Casts the value.
source§

impl CheckedCast<i128> for Round<f64>

source§

fn checked_cast(self) -> Option<i128>

Casts the value.
source§

impl CheckedCast<i16> for Round<f32>

source§

fn checked_cast(self) -> Option<i16>

Casts the value.
source§

impl CheckedCast<i16> for Round<f64>

source§

fn checked_cast(self) -> Option<i16>

Casts the value.
source§

impl CheckedCast<i32> for Round<f32>

source§

fn checked_cast(self) -> Option<i32>

Casts the value.
source§

impl CheckedCast<i32> for Round<f64>

source§

fn checked_cast(self) -> Option<i32>

Casts the value.
source§

impl CheckedCast<i64> for Round<f32>

source§

fn checked_cast(self) -> Option<i64>

Casts the value.
source§

impl CheckedCast<i64> for Round<f64>

source§

fn checked_cast(self) -> Option<i64>

Casts the value.
source§

impl CheckedCast<i8> for Round<f32>

source§

fn checked_cast(self) -> Option<i8>

Casts the value.
source§

impl CheckedCast<i8> for Round<f64>

source§

fn checked_cast(self) -> Option<i8>

Casts the value.
source§

impl CheckedCast<isize> for Round<f32>

source§

fn checked_cast(self) -> Option<isize>

Casts the value.
source§

impl CheckedCast<isize> for Round<f64>

source§

fn checked_cast(self) -> Option<isize>

Casts the value.
source§

impl CheckedCast<u128> for Round<f32>

source§

fn checked_cast(self) -> Option<u128>

Casts the value.
source§

impl CheckedCast<u128> for Round<f64>

source§

fn checked_cast(self) -> Option<u128>

Casts the value.
source§

impl CheckedCast<u16> for Round<f32>

source§

fn checked_cast(self) -> Option<u16>

Casts the value.
source§

impl CheckedCast<u16> for Round<f64>

source§

fn checked_cast(self) -> Option<u16>

Casts the value.
source§

impl CheckedCast<u32> for Round<f32>

source§

fn checked_cast(self) -> Option<u32>

Casts the value.
source§

impl CheckedCast<u32> for Round<f64>

source§

fn checked_cast(self) -> Option<u32>

Casts the value.
source§

impl CheckedCast<u64> for Round<f32>

source§

fn checked_cast(self) -> Option<u64>

Casts the value.
source§

impl CheckedCast<u64> for Round<f64>

source§

fn checked_cast(self) -> Option<u64>

Casts the value.
source§

impl CheckedCast<u8> for Round<f32>

source§

fn checked_cast(self) -> Option<u8>

Casts the value.
source§

impl CheckedCast<u8> for Round<f64>

source§

fn checked_cast(self) -> Option<u8>

Casts the value.
source§

impl CheckedCast<usize> for Round<f32>

source§

fn checked_cast(self) -> Option<usize>

Casts the value.
source§

impl CheckedCast<usize> for Round<f64>

source§

fn checked_cast(self) -> Option<usize>

Casts the value.
source§

impl<T: Clone> Clone for Round<T>

source§

fn clone(&self) -> Round<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Round<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for Round<T>

source§

fn default() -> Round<T>

Returns the “default value” for a type. Read more
source§

impl<T: Display> Display for Round<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
source§

impl<T: LowerExp> LowerExp for Round<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter.
source§

impl<T: Ord> Ord for Round<T>

source§

fn cmp(&self, other: &Round<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl OverflowingCast<i128> for Round<f32>

source§

fn overflowing_cast(self) -> (i128, bool)

Casts the value.
source§

impl OverflowingCast<i128> for Round<f64>

source§

fn overflowing_cast(self) -> (i128, bool)

Casts the value.
source§

impl OverflowingCast<i16> for Round<f32>

source§

fn overflowing_cast(self) -> (i16, bool)

Casts the value.
source§

impl OverflowingCast<i16> for Round<f64>

source§

fn overflowing_cast(self) -> (i16, bool)

Casts the value.
source§

impl OverflowingCast<i32> for Round<f32>

source§

fn overflowing_cast(self) -> (i32, bool)

Casts the value.
source§

impl OverflowingCast<i32> for Round<f64>

source§

fn overflowing_cast(self) -> (i32, bool)

Casts the value.
source§

impl OverflowingCast<i64> for Round<f32>

source§

fn overflowing_cast(self) -> (i64, bool)

Casts the value.
source§

impl OverflowingCast<i64> for Round<f64>

source§

fn overflowing_cast(self) -> (i64, bool)

Casts the value.
source§

impl OverflowingCast<i8> for Round<f32>

source§

fn overflowing_cast(self) -> (i8, bool)

Casts the value.
source§

impl OverflowingCast<i8> for Round<f64>

source§

fn overflowing_cast(self) -> (i8, bool)

Casts the value.
source§

impl OverflowingCast<isize> for Round<f32>

source§

fn overflowing_cast(self) -> (isize, bool)

Casts the value.
source§

impl OverflowingCast<isize> for Round<f64>

source§

fn overflowing_cast(self) -> (isize, bool)

Casts the value.
source§

impl OverflowingCast<u128> for Round<f32>

source§

fn overflowing_cast(self) -> (u128, bool)

Casts the value.
source§

impl OverflowingCast<u128> for Round<f64>

source§

fn overflowing_cast(self) -> (u128, bool)

Casts the value.
source§

impl OverflowingCast<u16> for Round<f32>

source§

fn overflowing_cast(self) -> (u16, bool)

Casts the value.
source§

impl OverflowingCast<u16> for Round<f64>

source§

fn overflowing_cast(self) -> (u16, bool)

Casts the value.
source§

impl OverflowingCast<u32> for Round<f32>

source§

fn overflowing_cast(self) -> (u32, bool)

Casts the value.
source§

impl OverflowingCast<u32> for Round<f64>

source§

fn overflowing_cast(self) -> (u32, bool)

Casts the value.
source§

impl OverflowingCast<u64> for Round<f32>

source§

fn overflowing_cast(self) -> (u64, bool)

Casts the value.
source§

impl OverflowingCast<u64> for Round<f64>

source§

fn overflowing_cast(self) -> (u64, bool)

Casts the value.
source§

impl OverflowingCast<u8> for Round<f32>

source§

fn overflowing_cast(self) -> (u8, bool)

Casts the value.
source§

impl OverflowingCast<u8> for Round<f64>

source§

fn overflowing_cast(self) -> (u8, bool)

Casts the value.
source§

impl OverflowingCast<usize> for Round<f32>

source§

fn overflowing_cast(self) -> (usize, bool)

Casts the value.
source§

impl OverflowingCast<usize> for Round<f64>

source§

fn overflowing_cast(self) -> (usize, bool)

Casts the value.
source§

impl<T: PartialEq> PartialEq for Round<T>

source§

fn eq(&self, other: &Round<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd> PartialOrd for Round<T>

source§

fn partial_cmp(&self, other: &Round<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl SaturatingCast<i128> for Round<f32>

source§

fn saturating_cast(self) -> i128

Casts the value.
source§

impl SaturatingCast<i128> for Round<f64>

source§

fn saturating_cast(self) -> i128

Casts the value.
source§

impl SaturatingCast<i16> for Round<f32>

source§

fn saturating_cast(self) -> i16

Casts the value.
source§

impl SaturatingCast<i16> for Round<f64>

source§

fn saturating_cast(self) -> i16

Casts the value.
source§

impl SaturatingCast<i32> for Round<f32>

source§

fn saturating_cast(self) -> i32

Casts the value.
source§

impl SaturatingCast<i32> for Round<f64>

source§

fn saturating_cast(self) -> i32

Casts the value.
source§

impl SaturatingCast<i64> for Round<f32>

source§

fn saturating_cast(self) -> i64

Casts the value.
source§

impl SaturatingCast<i64> for Round<f64>

source§

fn saturating_cast(self) -> i64

Casts the value.
source§

impl SaturatingCast<i8> for Round<f32>

source§

fn saturating_cast(self) -> i8

Casts the value.
source§

impl SaturatingCast<i8> for Round<f64>

source§

fn saturating_cast(self) -> i8

Casts the value.
source§

impl SaturatingCast<isize> for Round<f32>

source§

fn saturating_cast(self) -> isize

Casts the value.
source§

impl SaturatingCast<isize> for Round<f64>

source§

fn saturating_cast(self) -> isize

Casts the value.
source§

impl SaturatingCast<u128> for Round<f32>

source§

fn saturating_cast(self) -> u128

Casts the value.
source§

impl SaturatingCast<u128> for Round<f64>

source§

fn saturating_cast(self) -> u128

Casts the value.
source§

impl SaturatingCast<u16> for Round<f32>

source§

fn saturating_cast(self) -> u16

Casts the value.
source§

impl SaturatingCast<u16> for Round<f64>

source§

fn saturating_cast(self) -> u16

Casts the value.
source§

impl SaturatingCast<u32> for Round<f32>

source§

fn saturating_cast(self) -> u32

Casts the value.
source§

impl SaturatingCast<u32> for Round<f64>

source§

fn saturating_cast(self) -> u32

Casts the value.
source§

impl SaturatingCast<u64> for Round<f32>

source§

fn saturating_cast(self) -> u64

Casts the value.
source§

impl SaturatingCast<u64> for Round<f64>

source§

fn saturating_cast(self) -> u64

Casts the value.
source§

impl SaturatingCast<u8> for Round<f32>

source§

fn saturating_cast(self) -> u8

Casts the value.
source§

impl SaturatingCast<u8> for Round<f64>

source§

fn saturating_cast(self) -> u8

Casts the value.
source§

impl SaturatingCast<usize> for Round<f32>

source§

fn saturating_cast(self) -> usize

Casts the value.
source§

impl SaturatingCast<usize> for Round<f64>

source§

fn saturating_cast(self) -> usize

Casts the value.
source§

impl UnwrappedCast<Wrapping<i128>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<i128>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i128>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<i128>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i16>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<i16>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i16>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<i16>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i32>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<i32>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i32>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<i32>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i64>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<i64>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i64>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<i64>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i8>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<i8>

Casts the value.
source§

impl UnwrappedCast<Wrapping<i8>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<i8>

Casts the value.
source§

impl UnwrappedCast<Wrapping<isize>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<isize>

Casts the value.
source§

impl UnwrappedCast<Wrapping<isize>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<isize>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u128>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<u128>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u128>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<u128>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u16>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<u16>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u16>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<u16>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u32>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<u32>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u32>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<u32>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u64>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<u64>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u64>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<u64>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u8>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<u8>

Casts the value.
source§

impl UnwrappedCast<Wrapping<u8>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<u8>

Casts the value.
source§

impl UnwrappedCast<Wrapping<usize>> for Round<f32>

source§

fn unwrapped_cast(self) -> Wrapping<usize>

Casts the value.
source§

impl UnwrappedCast<Wrapping<usize>> for Round<f64>

source§

fn unwrapped_cast(self) -> Wrapping<usize>

Casts the value.
source§

impl UnwrappedCast<i128> for Round<f32>

source§

fn unwrapped_cast(self) -> i128

Casts the value.
source§

impl UnwrappedCast<i128> for Round<f64>

source§

fn unwrapped_cast(self) -> i128

Casts the value.
source§

impl UnwrappedCast<i16> for Round<f32>

source§

fn unwrapped_cast(self) -> i16

Casts the value.
source§

impl UnwrappedCast<i16> for Round<f64>

source§

fn unwrapped_cast(self) -> i16

Casts the value.
source§

impl UnwrappedCast<i32> for Round<f32>

source§

fn unwrapped_cast(self) -> i32

Casts the value.
source§

impl UnwrappedCast<i32> for Round<f64>

source§

fn unwrapped_cast(self) -> i32

Casts the value.
source§

impl UnwrappedCast<i64> for Round<f32>

source§

fn unwrapped_cast(self) -> i64

Casts the value.
source§

impl UnwrappedCast<i64> for Round<f64>

source§

fn unwrapped_cast(self) -> i64

Casts the value.
source§

impl UnwrappedCast<i8> for Round<f32>

source§

fn unwrapped_cast(self) -> i8

Casts the value.
source§

impl UnwrappedCast<i8> for Round<f64>

source§

fn unwrapped_cast(self) -> i8

Casts the value.
source§

impl UnwrappedCast<isize> for Round<f32>

source§

fn unwrapped_cast(self) -> isize

Casts the value.
source§

impl UnwrappedCast<isize> for Round<f64>

source§

fn unwrapped_cast(self) -> isize

Casts the value.
source§

impl UnwrappedCast<u128> for Round<f32>

source§

fn unwrapped_cast(self) -> u128

Casts the value.
source§

impl UnwrappedCast<u128> for Round<f64>

source§

fn unwrapped_cast(self) -> u128

Casts the value.
source§

impl UnwrappedCast<u16> for Round<f32>

source§

fn unwrapped_cast(self) -> u16

Casts the value.
source§

impl UnwrappedCast<u16> for Round<f64>

source§

fn unwrapped_cast(self) -> u16

Casts the value.
source§

impl UnwrappedCast<u32> for Round<f32>

source§

fn unwrapped_cast(self) -> u32

Casts the value.
source§

impl UnwrappedCast<u32> for Round<f64>

source§

fn unwrapped_cast(self) -> u32

Casts the value.
source§

impl UnwrappedCast<u64> for Round<f32>

source§

fn unwrapped_cast(self) -> u64

Casts the value.
source§

impl UnwrappedCast<u64> for Round<f64>

source§

fn unwrapped_cast(self) -> u64

Casts the value.
source§

impl UnwrappedCast<u8> for Round<f32>

source§

fn unwrapped_cast(self) -> u8

Casts the value.
source§

impl UnwrappedCast<u8> for Round<f64>

source§

fn unwrapped_cast(self) -> u8

Casts the value.
source§

impl UnwrappedCast<usize> for Round<f32>

source§

fn unwrapped_cast(self) -> usize

Casts the value.
source§

impl UnwrappedCast<usize> for Round<f64>

source§

fn unwrapped_cast(self) -> usize

Casts the value.
source§

impl<T: UpperExp> UpperExp for Round<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter.
source§

impl WrappingCast<i128> for Round<f32>

source§

fn wrapping_cast(self) -> i128

Casts the value.
source§

impl WrappingCast<i128> for Round<f64>

source§

fn wrapping_cast(self) -> i128

Casts the value.
source§

impl WrappingCast<i16> for Round<f32>

source§

fn wrapping_cast(self) -> i16

Casts the value.
source§

impl WrappingCast<i16> for Round<f64>

source§

fn wrapping_cast(self) -> i16

Casts the value.
source§

impl WrappingCast<i32> for Round<f32>

source§

fn wrapping_cast(self) -> i32

Casts the value.
source§

impl WrappingCast<i32> for Round<f64>

source§

fn wrapping_cast(self) -> i32

Casts the value.
source§

impl WrappingCast<i64> for Round<f32>

source§

fn wrapping_cast(self) -> i64

Casts the value.
source§

impl WrappingCast<i64> for Round<f64>

source§

fn wrapping_cast(self) -> i64

Casts the value.
source§

impl WrappingCast<i8> for Round<f32>

source§

fn wrapping_cast(self) -> i8

Casts the value.
source§

impl WrappingCast<i8> for Round<f64>

source§

fn wrapping_cast(self) -> i8

Casts the value.
source§

impl WrappingCast<isize> for Round<f32>

source§

fn wrapping_cast(self) -> isize

Casts the value.
source§

impl WrappingCast<isize> for Round<f64>

source§

fn wrapping_cast(self) -> isize

Casts the value.
source§

impl WrappingCast<u128> for Round<f32>

source§

fn wrapping_cast(self) -> u128

Casts the value.
source§

impl WrappingCast<u128> for Round<f64>

source§

fn wrapping_cast(self) -> u128

Casts the value.
source§

impl WrappingCast<u16> for Round<f32>

source§

fn wrapping_cast(self) -> u16

Casts the value.
source§

impl WrappingCast<u16> for Round<f64>

source§

fn wrapping_cast(self) -> u16

Casts the value.
source§

impl WrappingCast<u32> for Round<f32>

source§

fn wrapping_cast(self) -> u32

Casts the value.
source§

impl WrappingCast<u32> for Round<f64>

source§

fn wrapping_cast(self) -> u32

Casts the value.
source§

impl WrappingCast<u64> for Round<f32>

source§

fn wrapping_cast(self) -> u64

Casts the value.
source§

impl WrappingCast<u64> for Round<f64>

source§

fn wrapping_cast(self) -> u64

Casts the value.
source§

impl WrappingCast<u8> for Round<f32>

source§

fn wrapping_cast(self) -> u8

Casts the value.
source§

impl WrappingCast<u8> for Round<f64>

source§

fn wrapping_cast(self) -> u8

Casts the value.
source§

impl WrappingCast<usize> for Round<f32>

source§

fn wrapping_cast(self) -> usize

Casts the value.
source§

impl WrappingCast<usize> for Round<f64>

source§

fn wrapping_cast(self) -> usize

Casts the value.
source§

impl<T: Copy> Copy for Round<T>

source§

impl<T: Eq> Eq for Round<T>

source§

impl<T> StructuralPartialEq for Round<T>

Auto Trait Implementations§

§

impl<T> Freeze for Round<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Round<T>
where T: RefUnwindSafe,

§

impl<T> Send for Round<T>
where T: Send,

§

impl<T> Sync for Round<T>
where T: Sync,

§

impl<T> Unpin for Round<T>
where T: Unpin,

§

impl<T> UnwindSafe for Round<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.