#[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
sourceimpl CheckedCast<Wrapping<i128>> for Round<f32>
impl CheckedCast<Wrapping<i128>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<i128>>
fn checked_cast(self) -> Option<Wrapping<i128>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i128>> for Round<f64>
impl CheckedCast<Wrapping<i128>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<i128>>
fn checked_cast(self) -> Option<Wrapping<i128>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i16>> for Round<f32>
impl CheckedCast<Wrapping<i16>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<i16>>
fn checked_cast(self) -> Option<Wrapping<i16>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i16>> for Round<f64>
impl CheckedCast<Wrapping<i16>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<i16>>
fn checked_cast(self) -> Option<Wrapping<i16>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i32>> for Round<f32>
impl CheckedCast<Wrapping<i32>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<i32>>
fn checked_cast(self) -> Option<Wrapping<i32>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i32>> for Round<f64>
impl CheckedCast<Wrapping<i32>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<i32>>
fn checked_cast(self) -> Option<Wrapping<i32>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i64>> for Round<f32>
impl CheckedCast<Wrapping<i64>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<i64>>
fn checked_cast(self) -> Option<Wrapping<i64>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i64>> for Round<f64>
impl CheckedCast<Wrapping<i64>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<i64>>
fn checked_cast(self) -> Option<Wrapping<i64>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i8>> for Round<f32>
impl CheckedCast<Wrapping<i8>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<i8>>
fn checked_cast(self) -> Option<Wrapping<i8>>
Casts the value.
sourceimpl CheckedCast<Wrapping<i8>> for Round<f64>
impl CheckedCast<Wrapping<i8>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<i8>>
fn checked_cast(self) -> Option<Wrapping<i8>>
Casts the value.
sourceimpl CheckedCast<Wrapping<isize>> for Round<f32>
impl CheckedCast<Wrapping<isize>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<isize>>
fn checked_cast(self) -> Option<Wrapping<isize>>
Casts the value.
sourceimpl CheckedCast<Wrapping<isize>> for Round<f64>
impl CheckedCast<Wrapping<isize>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<isize>>
fn checked_cast(self) -> Option<Wrapping<isize>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u128>> for Round<f32>
impl CheckedCast<Wrapping<u128>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<u128>>
fn checked_cast(self) -> Option<Wrapping<u128>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u128>> for Round<f64>
impl CheckedCast<Wrapping<u128>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<u128>>
fn checked_cast(self) -> Option<Wrapping<u128>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u16>> for Round<f32>
impl CheckedCast<Wrapping<u16>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<u16>>
fn checked_cast(self) -> Option<Wrapping<u16>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u16>> for Round<f64>
impl CheckedCast<Wrapping<u16>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<u16>>
fn checked_cast(self) -> Option<Wrapping<u16>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u32>> for Round<f32>
impl CheckedCast<Wrapping<u32>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<u32>>
fn checked_cast(self) -> Option<Wrapping<u32>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u32>> for Round<f64>
impl CheckedCast<Wrapping<u32>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<u32>>
fn checked_cast(self) -> Option<Wrapping<u32>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u64>> for Round<f32>
impl CheckedCast<Wrapping<u64>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<u64>>
fn checked_cast(self) -> Option<Wrapping<u64>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u64>> for Round<f64>
impl CheckedCast<Wrapping<u64>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<u64>>
fn checked_cast(self) -> Option<Wrapping<u64>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u8>> for Round<f32>
impl CheckedCast<Wrapping<u8>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<u8>>
fn checked_cast(self) -> Option<Wrapping<u8>>
Casts the value.
sourceimpl CheckedCast<Wrapping<u8>> for Round<f64>
impl CheckedCast<Wrapping<u8>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<u8>>
fn checked_cast(self) -> Option<Wrapping<u8>>
Casts the value.
sourceimpl CheckedCast<Wrapping<usize>> for Round<f32>
impl CheckedCast<Wrapping<usize>> for Round<f32>
sourcefn checked_cast(self) -> Option<Wrapping<usize>>
fn checked_cast(self) -> Option<Wrapping<usize>>
Casts the value.
sourceimpl CheckedCast<Wrapping<usize>> for Round<f64>
impl CheckedCast<Wrapping<usize>> for Round<f64>
sourcefn checked_cast(self) -> Option<Wrapping<usize>>
fn checked_cast(self) -> Option<Wrapping<usize>>
Casts the value.
sourceimpl CheckedCast<i128> for Round<f32>
impl CheckedCast<i128> for Round<f32>
sourcefn checked_cast(self) -> Option<i128>
fn checked_cast(self) -> Option<i128>
Casts the value.
sourceimpl CheckedCast<i128> for Round<f64>
impl CheckedCast<i128> for Round<f64>
sourcefn checked_cast(self) -> Option<i128>
fn checked_cast(self) -> Option<i128>
Casts the value.
sourceimpl CheckedCast<i16> for Round<f32>
impl CheckedCast<i16> for Round<f32>
sourcefn checked_cast(self) -> Option<i16>
fn checked_cast(self) -> Option<i16>
Casts the value.
sourceimpl CheckedCast<i16> for Round<f64>
impl CheckedCast<i16> for Round<f64>
sourcefn checked_cast(self) -> Option<i16>
fn checked_cast(self) -> Option<i16>
Casts the value.
sourceimpl CheckedCast<i32> for Round<f32>
impl CheckedCast<i32> for Round<f32>
sourcefn checked_cast(self) -> Option<i32>
fn checked_cast(self) -> Option<i32>
Casts the value.
sourceimpl CheckedCast<i32> for Round<f64>
impl CheckedCast<i32> for Round<f64>
sourcefn checked_cast(self) -> Option<i32>
fn checked_cast(self) -> Option<i32>
Casts the value.
sourceimpl CheckedCast<i64> for Round<f32>
impl CheckedCast<i64> for Round<f32>
sourcefn checked_cast(self) -> Option<i64>
fn checked_cast(self) -> Option<i64>
Casts the value.
sourceimpl CheckedCast<i64> for Round<f64>
impl CheckedCast<i64> for Round<f64>
sourcefn checked_cast(self) -> Option<i64>
fn checked_cast(self) -> Option<i64>
Casts the value.
sourceimpl CheckedCast<i8> for Round<f32>
impl CheckedCast<i8> for Round<f32>
sourcefn checked_cast(self) -> Option<i8>
fn checked_cast(self) -> Option<i8>
Casts the value.
sourceimpl CheckedCast<i8> for Round<f64>
impl CheckedCast<i8> for Round<f64>
sourcefn checked_cast(self) -> Option<i8>
fn checked_cast(self) -> Option<i8>
Casts the value.
sourceimpl CheckedCast<isize> for Round<f32>
impl CheckedCast<isize> for Round<f32>
sourcefn checked_cast(self) -> Option<isize>
fn checked_cast(self) -> Option<isize>
Casts the value.
sourceimpl CheckedCast<isize> for Round<f64>
impl CheckedCast<isize> for Round<f64>
sourcefn checked_cast(self) -> Option<isize>
fn checked_cast(self) -> Option<isize>
Casts the value.
sourceimpl CheckedCast<u128> for Round<f32>
impl CheckedCast<u128> for Round<f32>
sourcefn checked_cast(self) -> Option<u128>
fn checked_cast(self) -> Option<u128>
Casts the value.
sourceimpl CheckedCast<u128> for Round<f64>
impl CheckedCast<u128> for Round<f64>
sourcefn checked_cast(self) -> Option<u128>
fn checked_cast(self) -> Option<u128>
Casts the value.
sourceimpl CheckedCast<u16> for Round<f32>
impl CheckedCast<u16> for Round<f32>
sourcefn checked_cast(self) -> Option<u16>
fn checked_cast(self) -> Option<u16>
Casts the value.
sourceimpl CheckedCast<u16> for Round<f64>
impl CheckedCast<u16> for Round<f64>
sourcefn checked_cast(self) -> Option<u16>
fn checked_cast(self) -> Option<u16>
Casts the value.
sourceimpl CheckedCast<u32> for Round<f32>
impl CheckedCast<u32> for Round<f32>
sourcefn checked_cast(self) -> Option<u32>
fn checked_cast(self) -> Option<u32>
Casts the value.
sourceimpl CheckedCast<u32> for Round<f64>
impl CheckedCast<u32> for Round<f64>
sourcefn checked_cast(self) -> Option<u32>
fn checked_cast(self) -> Option<u32>
Casts the value.
sourceimpl CheckedCast<u64> for Round<f32>
impl CheckedCast<u64> for Round<f32>
sourcefn checked_cast(self) -> Option<u64>
fn checked_cast(self) -> Option<u64>
Casts the value.
sourceimpl CheckedCast<u64> for Round<f64>
impl CheckedCast<u64> for Round<f64>
sourcefn checked_cast(self) -> Option<u64>
fn checked_cast(self) -> Option<u64>
Casts the value.
sourceimpl CheckedCast<u8> for Round<f32>
impl CheckedCast<u8> for Round<f32>
sourcefn checked_cast(self) -> Option<u8>
fn checked_cast(self) -> Option<u8>
Casts the value.
sourceimpl CheckedCast<u8> for Round<f64>
impl CheckedCast<u8> for Round<f64>
sourcefn checked_cast(self) -> Option<u8>
fn checked_cast(self) -> Option<u8>
Casts the value.
sourceimpl CheckedCast<usize> for Round<f32>
impl CheckedCast<usize> for Round<f32>
sourcefn checked_cast(self) -> Option<usize>
fn checked_cast(self) -> Option<usize>
Casts the value.
sourceimpl CheckedCast<usize> for Round<f64>
impl CheckedCast<usize> for Round<f64>
sourcefn checked_cast(self) -> Option<usize>
fn checked_cast(self) -> Option<usize>
Casts the value.
sourceimpl OverflowingCast<i128> for Round<f32>
impl OverflowingCast<i128> for Round<f32>
sourceimpl OverflowingCast<i128> for Round<f64>
impl OverflowingCast<i128> for Round<f64>
sourceimpl OverflowingCast<i16> for Round<f32>
impl OverflowingCast<i16> for Round<f32>
sourceimpl OverflowingCast<i16> for Round<f64>
impl OverflowingCast<i16> for Round<f64>
sourceimpl OverflowingCast<i32> for Round<f32>
impl OverflowingCast<i32> for Round<f32>
sourceimpl OverflowingCast<i32> for Round<f64>
impl OverflowingCast<i32> for Round<f64>
sourceimpl OverflowingCast<i64> for Round<f32>
impl OverflowingCast<i64> for Round<f32>
sourceimpl OverflowingCast<i64> for Round<f64>
impl OverflowingCast<i64> for Round<f64>
sourceimpl OverflowingCast<i8> for Round<f32>
impl OverflowingCast<i8> for Round<f32>
sourceimpl OverflowingCast<i8> for Round<f64>
impl OverflowingCast<i8> for Round<f64>
sourceimpl OverflowingCast<isize> for Round<f32>
impl OverflowingCast<isize> for Round<f32>
sourceimpl OverflowingCast<isize> for Round<f64>
impl OverflowingCast<isize> for Round<f64>
sourceimpl OverflowingCast<u128> for Round<f32>
impl OverflowingCast<u128> for Round<f32>
sourceimpl OverflowingCast<u128> for Round<f64>
impl OverflowingCast<u128> for Round<f64>
sourceimpl OverflowingCast<u16> for Round<f32>
impl OverflowingCast<u16> for Round<f32>
sourceimpl OverflowingCast<u16> for Round<f64>
impl OverflowingCast<u16> for Round<f64>
sourceimpl OverflowingCast<u32> for Round<f32>
impl OverflowingCast<u32> for Round<f32>
sourceimpl OverflowingCast<u32> for Round<f64>
impl OverflowingCast<u32> for Round<f64>
sourceimpl OverflowingCast<u64> for Round<f32>
impl OverflowingCast<u64> for Round<f32>
sourceimpl OverflowingCast<u64> for Round<f64>
impl OverflowingCast<u64> for Round<f64>
sourceimpl OverflowingCast<u8> for Round<f32>
impl OverflowingCast<u8> for Round<f32>
sourceimpl OverflowingCast<u8> for Round<f64>
impl OverflowingCast<u8> for Round<f64>
sourceimpl OverflowingCast<usize> for Round<f32>
impl OverflowingCast<usize> for Round<f32>
sourceimpl OverflowingCast<usize> for Round<f64>
impl OverflowingCast<usize> for Round<f64>
sourceimpl<T: PartialOrd> PartialOrd<Round<T>> for Round<T>
impl<T: PartialOrd> PartialOrd<Round<T>> for Round<T>
sourcefn partial_cmp(&self, other: &Round<T>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn le(&self, other: &Rhs) -> bool
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
sourceimpl SaturatingCast<i128> for Round<f32>
impl SaturatingCast<i128> for Round<f32>
sourcefn saturating_cast(self) -> i128
fn saturating_cast(self) -> i128
Casts the value.
sourceimpl SaturatingCast<i128> for Round<f64>
impl SaturatingCast<i128> for Round<f64>
sourcefn saturating_cast(self) -> i128
fn saturating_cast(self) -> i128
Casts the value.
sourceimpl SaturatingCast<i16> for Round<f32>
impl SaturatingCast<i16> for Round<f32>
sourcefn saturating_cast(self) -> i16
fn saturating_cast(self) -> i16
Casts the value.
sourceimpl SaturatingCast<i16> for Round<f64>
impl SaturatingCast<i16> for Round<f64>
sourcefn saturating_cast(self) -> i16
fn saturating_cast(self) -> i16
Casts the value.
sourceimpl SaturatingCast<i32> for Round<f32>
impl SaturatingCast<i32> for Round<f32>
sourcefn saturating_cast(self) -> i32
fn saturating_cast(self) -> i32
Casts the value.
sourceimpl SaturatingCast<i32> for Round<f64>
impl SaturatingCast<i32> for Round<f64>
sourcefn saturating_cast(self) -> i32
fn saturating_cast(self) -> i32
Casts the value.
sourceimpl SaturatingCast<i64> for Round<f32>
impl SaturatingCast<i64> for Round<f32>
sourcefn saturating_cast(self) -> i64
fn saturating_cast(self) -> i64
Casts the value.
sourceimpl SaturatingCast<i64> for Round<f64>
impl SaturatingCast<i64> for Round<f64>
sourcefn saturating_cast(self) -> i64
fn saturating_cast(self) -> i64
Casts the value.
sourceimpl SaturatingCast<i8> for Round<f32>
impl SaturatingCast<i8> for Round<f32>
sourcefn saturating_cast(self) -> i8
fn saturating_cast(self) -> i8
Casts the value.
sourceimpl SaturatingCast<i8> for Round<f64>
impl SaturatingCast<i8> for Round<f64>
sourcefn saturating_cast(self) -> i8
fn saturating_cast(self) -> i8
Casts the value.
sourceimpl SaturatingCast<isize> for Round<f32>
impl SaturatingCast<isize> for Round<f32>
sourcefn saturating_cast(self) -> isize
fn saturating_cast(self) -> isize
Casts the value.
sourceimpl SaturatingCast<isize> for Round<f64>
impl SaturatingCast<isize> for Round<f64>
sourcefn saturating_cast(self) -> isize
fn saturating_cast(self) -> isize
Casts the value.
sourceimpl SaturatingCast<u128> for Round<f32>
impl SaturatingCast<u128> for Round<f32>
sourcefn saturating_cast(self) -> u128
fn saturating_cast(self) -> u128
Casts the value.
sourceimpl SaturatingCast<u128> for Round<f64>
impl SaturatingCast<u128> for Round<f64>
sourcefn saturating_cast(self) -> u128
fn saturating_cast(self) -> u128
Casts the value.
sourceimpl SaturatingCast<u16> for Round<f32>
impl SaturatingCast<u16> for Round<f32>
sourcefn saturating_cast(self) -> u16
fn saturating_cast(self) -> u16
Casts the value.
sourceimpl SaturatingCast<u16> for Round<f64>
impl SaturatingCast<u16> for Round<f64>
sourcefn saturating_cast(self) -> u16
fn saturating_cast(self) -> u16
Casts the value.
sourceimpl SaturatingCast<u32> for Round<f32>
impl SaturatingCast<u32> for Round<f32>
sourcefn saturating_cast(self) -> u32
fn saturating_cast(self) -> u32
Casts the value.
sourceimpl SaturatingCast<u32> for Round<f64>
impl SaturatingCast<u32> for Round<f64>
sourcefn saturating_cast(self) -> u32
fn saturating_cast(self) -> u32
Casts the value.
sourceimpl SaturatingCast<u64> for Round<f32>
impl SaturatingCast<u64> for Round<f32>
sourcefn saturating_cast(self) -> u64
fn saturating_cast(self) -> u64
Casts the value.
sourceimpl SaturatingCast<u64> for Round<f64>
impl SaturatingCast<u64> for Round<f64>
sourcefn saturating_cast(self) -> u64
fn saturating_cast(self) -> u64
Casts the value.
sourceimpl SaturatingCast<u8> for Round<f32>
impl SaturatingCast<u8> for Round<f32>
sourcefn saturating_cast(self) -> u8
fn saturating_cast(self) -> u8
Casts the value.
sourceimpl SaturatingCast<u8> for Round<f64>
impl SaturatingCast<u8> for Round<f64>
sourcefn saturating_cast(self) -> u8
fn saturating_cast(self) -> u8
Casts the value.
sourceimpl SaturatingCast<usize> for Round<f32>
impl SaturatingCast<usize> for Round<f32>
sourcefn saturating_cast(self) -> usize
fn saturating_cast(self) -> usize
Casts the value.
sourceimpl SaturatingCast<usize> for Round<f64>
impl SaturatingCast<usize> for Round<f64>
sourcefn saturating_cast(self) -> usize
fn saturating_cast(self) -> usize
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i128>> for Round<f32>
impl UnwrappedCast<Wrapping<i128>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<i128>
fn unwrapped_cast(self) -> Wrapping<i128>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i128>> for Round<f64>
impl UnwrappedCast<Wrapping<i128>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<i128>
fn unwrapped_cast(self) -> Wrapping<i128>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i16>> for Round<f32>
impl UnwrappedCast<Wrapping<i16>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<i16>
fn unwrapped_cast(self) -> Wrapping<i16>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i16>> for Round<f64>
impl UnwrappedCast<Wrapping<i16>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<i16>
fn unwrapped_cast(self) -> Wrapping<i16>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i32>> for Round<f32>
impl UnwrappedCast<Wrapping<i32>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<i32>
fn unwrapped_cast(self) -> Wrapping<i32>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i32>> for Round<f64>
impl UnwrappedCast<Wrapping<i32>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<i32>
fn unwrapped_cast(self) -> Wrapping<i32>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i64>> for Round<f32>
impl UnwrappedCast<Wrapping<i64>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<i64>
fn unwrapped_cast(self) -> Wrapping<i64>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i64>> for Round<f64>
impl UnwrappedCast<Wrapping<i64>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<i64>
fn unwrapped_cast(self) -> Wrapping<i64>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i8>> for Round<f32>
impl UnwrappedCast<Wrapping<i8>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<i8>
fn unwrapped_cast(self) -> Wrapping<i8>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<i8>> for Round<f64>
impl UnwrappedCast<Wrapping<i8>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<i8>
fn unwrapped_cast(self) -> Wrapping<i8>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<isize>> for Round<f32>
impl UnwrappedCast<Wrapping<isize>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<isize>
fn unwrapped_cast(self) -> Wrapping<isize>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<isize>> for Round<f64>
impl UnwrappedCast<Wrapping<isize>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<isize>
fn unwrapped_cast(self) -> Wrapping<isize>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u128>> for Round<f32>
impl UnwrappedCast<Wrapping<u128>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<u128>
fn unwrapped_cast(self) -> Wrapping<u128>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u128>> for Round<f64>
impl UnwrappedCast<Wrapping<u128>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<u128>
fn unwrapped_cast(self) -> Wrapping<u128>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u16>> for Round<f32>
impl UnwrappedCast<Wrapping<u16>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<u16>
fn unwrapped_cast(self) -> Wrapping<u16>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u16>> for Round<f64>
impl UnwrappedCast<Wrapping<u16>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<u16>
fn unwrapped_cast(self) -> Wrapping<u16>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u32>> for Round<f32>
impl UnwrappedCast<Wrapping<u32>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<u32>
fn unwrapped_cast(self) -> Wrapping<u32>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u32>> for Round<f64>
impl UnwrappedCast<Wrapping<u32>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<u32>
fn unwrapped_cast(self) -> Wrapping<u32>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u64>> for Round<f32>
impl UnwrappedCast<Wrapping<u64>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<u64>
fn unwrapped_cast(self) -> Wrapping<u64>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u64>> for Round<f64>
impl UnwrappedCast<Wrapping<u64>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<u64>
fn unwrapped_cast(self) -> Wrapping<u64>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u8>> for Round<f32>
impl UnwrappedCast<Wrapping<u8>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<u8>
fn unwrapped_cast(self) -> Wrapping<u8>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<u8>> for Round<f64>
impl UnwrappedCast<Wrapping<u8>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<u8>
fn unwrapped_cast(self) -> Wrapping<u8>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<usize>> for Round<f32>
impl UnwrappedCast<Wrapping<usize>> for Round<f32>
sourcefn unwrapped_cast(self) -> Wrapping<usize>
fn unwrapped_cast(self) -> Wrapping<usize>
Casts the value.
sourceimpl UnwrappedCast<Wrapping<usize>> for Round<f64>
impl UnwrappedCast<Wrapping<usize>> for Round<f64>
sourcefn unwrapped_cast(self) -> Wrapping<usize>
fn unwrapped_cast(self) -> Wrapping<usize>
Casts the value.
sourceimpl UnwrappedCast<i128> for Round<f32>
impl UnwrappedCast<i128> for Round<f32>
sourcefn unwrapped_cast(self) -> i128
fn unwrapped_cast(self) -> i128
Casts the value.
sourceimpl UnwrappedCast<i128> for Round<f64>
impl UnwrappedCast<i128> for Round<f64>
sourcefn unwrapped_cast(self) -> i128
fn unwrapped_cast(self) -> i128
Casts the value.
sourceimpl UnwrappedCast<i16> for Round<f32>
impl UnwrappedCast<i16> for Round<f32>
sourcefn unwrapped_cast(self) -> i16
fn unwrapped_cast(self) -> i16
Casts the value.
sourceimpl UnwrappedCast<i16> for Round<f64>
impl UnwrappedCast<i16> for Round<f64>
sourcefn unwrapped_cast(self) -> i16
fn unwrapped_cast(self) -> i16
Casts the value.
sourceimpl UnwrappedCast<i32> for Round<f32>
impl UnwrappedCast<i32> for Round<f32>
sourcefn unwrapped_cast(self) -> i32
fn unwrapped_cast(self) -> i32
Casts the value.
sourceimpl UnwrappedCast<i32> for Round<f64>
impl UnwrappedCast<i32> for Round<f64>
sourcefn unwrapped_cast(self) -> i32
fn unwrapped_cast(self) -> i32
Casts the value.
sourceimpl UnwrappedCast<i64> for Round<f32>
impl UnwrappedCast<i64> for Round<f32>
sourcefn unwrapped_cast(self) -> i64
fn unwrapped_cast(self) -> i64
Casts the value.
sourceimpl UnwrappedCast<i64> for Round<f64>
impl UnwrappedCast<i64> for Round<f64>
sourcefn unwrapped_cast(self) -> i64
fn unwrapped_cast(self) -> i64
Casts the value.
sourceimpl UnwrappedCast<i8> for Round<f32>
impl UnwrappedCast<i8> for Round<f32>
sourcefn unwrapped_cast(self) -> i8
fn unwrapped_cast(self) -> i8
Casts the value.
sourceimpl UnwrappedCast<i8> for Round<f64>
impl UnwrappedCast<i8> for Round<f64>
sourcefn unwrapped_cast(self) -> i8
fn unwrapped_cast(self) -> i8
Casts the value.
sourceimpl UnwrappedCast<isize> for Round<f32>
impl UnwrappedCast<isize> for Round<f32>
sourcefn unwrapped_cast(self) -> isize
fn unwrapped_cast(self) -> isize
Casts the value.
sourceimpl UnwrappedCast<isize> for Round<f64>
impl UnwrappedCast<isize> for Round<f64>
sourcefn unwrapped_cast(self) -> isize
fn unwrapped_cast(self) -> isize
Casts the value.
sourceimpl UnwrappedCast<u128> for Round<f32>
impl UnwrappedCast<u128> for Round<f32>
sourcefn unwrapped_cast(self) -> u128
fn unwrapped_cast(self) -> u128
Casts the value.
sourceimpl UnwrappedCast<u128> for Round<f64>
impl UnwrappedCast<u128> for Round<f64>
sourcefn unwrapped_cast(self) -> u128
fn unwrapped_cast(self) -> u128
Casts the value.
sourceimpl UnwrappedCast<u16> for Round<f32>
impl UnwrappedCast<u16> for Round<f32>
sourcefn unwrapped_cast(self) -> u16
fn unwrapped_cast(self) -> u16
Casts the value.
sourceimpl UnwrappedCast<u16> for Round<f64>
impl UnwrappedCast<u16> for Round<f64>
sourcefn unwrapped_cast(self) -> u16
fn unwrapped_cast(self) -> u16
Casts the value.
sourceimpl UnwrappedCast<u32> for Round<f32>
impl UnwrappedCast<u32> for Round<f32>
sourcefn unwrapped_cast(self) -> u32
fn unwrapped_cast(self) -> u32
Casts the value.
sourceimpl UnwrappedCast<u32> for Round<f64>
impl UnwrappedCast<u32> for Round<f64>
sourcefn unwrapped_cast(self) -> u32
fn unwrapped_cast(self) -> u32
Casts the value.
sourceimpl UnwrappedCast<u64> for Round<f32>
impl UnwrappedCast<u64> for Round<f32>
sourcefn unwrapped_cast(self) -> u64
fn unwrapped_cast(self) -> u64
Casts the value.
sourceimpl UnwrappedCast<u64> for Round<f64>
impl UnwrappedCast<u64> for Round<f64>
sourcefn unwrapped_cast(self) -> u64
fn unwrapped_cast(self) -> u64
Casts the value.
sourceimpl UnwrappedCast<u8> for Round<f32>
impl UnwrappedCast<u8> for Round<f32>
sourcefn unwrapped_cast(self) -> u8
fn unwrapped_cast(self) -> u8
Casts the value.
sourceimpl UnwrappedCast<u8> for Round<f64>
impl UnwrappedCast<u8> for Round<f64>
sourcefn unwrapped_cast(self) -> u8
fn unwrapped_cast(self) -> u8
Casts the value.
sourceimpl UnwrappedCast<usize> for Round<f32>
impl UnwrappedCast<usize> for Round<f32>
sourcefn unwrapped_cast(self) -> usize
fn unwrapped_cast(self) -> usize
Casts the value.
sourceimpl UnwrappedCast<usize> for Round<f64>
impl UnwrappedCast<usize> for Round<f64>
sourcefn unwrapped_cast(self) -> usize
fn unwrapped_cast(self) -> usize
Casts the value.
sourceimpl WrappingCast<i128> for Round<f32>
impl WrappingCast<i128> for Round<f32>
sourcefn wrapping_cast(self) -> i128
fn wrapping_cast(self) -> i128
Casts the value.
sourceimpl WrappingCast<i128> for Round<f64>
impl WrappingCast<i128> for Round<f64>
sourcefn wrapping_cast(self) -> i128
fn wrapping_cast(self) -> i128
Casts the value.
sourceimpl WrappingCast<i16> for Round<f32>
impl WrappingCast<i16> for Round<f32>
sourcefn wrapping_cast(self) -> i16
fn wrapping_cast(self) -> i16
Casts the value.
sourceimpl WrappingCast<i16> for Round<f64>
impl WrappingCast<i16> for Round<f64>
sourcefn wrapping_cast(self) -> i16
fn wrapping_cast(self) -> i16
Casts the value.
sourceimpl WrappingCast<i32> for Round<f32>
impl WrappingCast<i32> for Round<f32>
sourcefn wrapping_cast(self) -> i32
fn wrapping_cast(self) -> i32
Casts the value.
sourceimpl WrappingCast<i32> for Round<f64>
impl WrappingCast<i32> for Round<f64>
sourcefn wrapping_cast(self) -> i32
fn wrapping_cast(self) -> i32
Casts the value.
sourceimpl WrappingCast<i64> for Round<f32>
impl WrappingCast<i64> for Round<f32>
sourcefn wrapping_cast(self) -> i64
fn wrapping_cast(self) -> i64
Casts the value.
sourceimpl WrappingCast<i64> for Round<f64>
impl WrappingCast<i64> for Round<f64>
sourcefn wrapping_cast(self) -> i64
fn wrapping_cast(self) -> i64
Casts the value.
sourceimpl WrappingCast<i8> for Round<f32>
impl WrappingCast<i8> for Round<f32>
sourcefn wrapping_cast(self) -> i8
fn wrapping_cast(self) -> i8
Casts the value.
sourceimpl WrappingCast<i8> for Round<f64>
impl WrappingCast<i8> for Round<f64>
sourcefn wrapping_cast(self) -> i8
fn wrapping_cast(self) -> i8
Casts the value.
sourceimpl WrappingCast<isize> for Round<f32>
impl WrappingCast<isize> for Round<f32>
sourcefn wrapping_cast(self) -> isize
fn wrapping_cast(self) -> isize
Casts the value.
sourceimpl WrappingCast<isize> for Round<f64>
impl WrappingCast<isize> for Round<f64>
sourcefn wrapping_cast(self) -> isize
fn wrapping_cast(self) -> isize
Casts the value.
sourceimpl WrappingCast<u128> for Round<f32>
impl WrappingCast<u128> for Round<f32>
sourcefn wrapping_cast(self) -> u128
fn wrapping_cast(self) -> u128
Casts the value.
sourceimpl WrappingCast<u128> for Round<f64>
impl WrappingCast<u128> for Round<f64>
sourcefn wrapping_cast(self) -> u128
fn wrapping_cast(self) -> u128
Casts the value.
sourceimpl WrappingCast<u16> for Round<f32>
impl WrappingCast<u16> for Round<f32>
sourcefn wrapping_cast(self) -> u16
fn wrapping_cast(self) -> u16
Casts the value.
sourceimpl WrappingCast<u16> for Round<f64>
impl WrappingCast<u16> for Round<f64>
sourcefn wrapping_cast(self) -> u16
fn wrapping_cast(self) -> u16
Casts the value.
sourceimpl WrappingCast<u32> for Round<f32>
impl WrappingCast<u32> for Round<f32>
sourcefn wrapping_cast(self) -> u32
fn wrapping_cast(self) -> u32
Casts the value.
sourceimpl WrappingCast<u32> for Round<f64>
impl WrappingCast<u32> for Round<f64>
sourcefn wrapping_cast(self) -> u32
fn wrapping_cast(self) -> u32
Casts the value.
sourceimpl WrappingCast<u64> for Round<f32>
impl WrappingCast<u64> for Round<f32>
sourcefn wrapping_cast(self) -> u64
fn wrapping_cast(self) -> u64
Casts the value.
sourceimpl WrappingCast<u64> for Round<f64>
impl WrappingCast<u64> for Round<f64>
sourcefn wrapping_cast(self) -> u64
fn wrapping_cast(self) -> u64
Casts the value.
sourceimpl WrappingCast<u8> for Round<f32>
impl WrappingCast<u8> for Round<f32>
sourcefn wrapping_cast(self) -> u8
fn wrapping_cast(self) -> u8
Casts the value.
sourceimpl WrappingCast<u8> for Round<f64>
impl WrappingCast<u8> for Round<f64>
sourcefn wrapping_cast(self) -> u8
fn wrapping_cast(self) -> u8
Casts the value.
sourceimpl WrappingCast<usize> for Round<f32>
impl WrappingCast<usize> for Round<f32>
sourcefn wrapping_cast(self) -> usize
fn wrapping_cast(self) -> usize
Casts the value.
sourceimpl WrappingCast<usize> for Round<f64>
impl WrappingCast<usize> for Round<f64>
sourcefn wrapping_cast(self) -> usize
fn wrapping_cast(self) -> usize
Casts the value.
impl<T: Copy> Copy for Round<T>
impl<T> StructuralPartialEq for Round<T>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
Self: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
Self: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Self>
fn checked_cast_from(src: Src) -> Option<Self>
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
Self: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
Self: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Self, bool)
fn overflowing_cast_from(src: Src) -> (Self, bool)
OverflowingCasts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
Self: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
Self: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Self
fn saturating_cast_from(src: Src) -> Self
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
Self: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
Self: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Self
fn unwrapped_cast_from(src: Src) -> Self
UnwrappedCasts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
Self: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
Self: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Self
fn wrapping_cast_from(src: Src) -> Self
WrappingCasts the value.