#[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 CheckedCast<i128> for Round<f32>
impl CheckedCast<i128> for Round<f32>
source§fn checked_cast(self) -> Option<i128>
fn checked_cast(self) -> Option<i128>
Casts the value.
source§impl CheckedCast<i128> for Round<f64>
impl CheckedCast<i128> for Round<f64>
source§fn checked_cast(self) -> Option<i128>
fn checked_cast(self) -> Option<i128>
Casts the value.
source§impl CheckedCast<i16> for Round<f32>
impl CheckedCast<i16> for Round<f32>
source§fn checked_cast(self) -> Option<i16>
fn checked_cast(self) -> Option<i16>
Casts the value.
source§impl CheckedCast<i16> for Round<f64>
impl CheckedCast<i16> for Round<f64>
source§fn checked_cast(self) -> Option<i16>
fn checked_cast(self) -> Option<i16>
Casts the value.
source§impl CheckedCast<i32> for Round<f32>
impl CheckedCast<i32> for Round<f32>
source§fn checked_cast(self) -> Option<i32>
fn checked_cast(self) -> Option<i32>
Casts the value.
source§impl CheckedCast<i32> for Round<f64>
impl CheckedCast<i32> for Round<f64>
source§fn checked_cast(self) -> Option<i32>
fn checked_cast(self) -> Option<i32>
Casts the value.
source§impl CheckedCast<i64> for Round<f32>
impl CheckedCast<i64> for Round<f32>
source§fn checked_cast(self) -> Option<i64>
fn checked_cast(self) -> Option<i64>
Casts the value.
source§impl CheckedCast<i64> for Round<f64>
impl CheckedCast<i64> for Round<f64>
source§fn checked_cast(self) -> Option<i64>
fn checked_cast(self) -> Option<i64>
Casts the value.
source§impl CheckedCast<i8> for Round<f32>
impl CheckedCast<i8> for Round<f32>
source§fn checked_cast(self) -> Option<i8>
fn checked_cast(self) -> Option<i8>
Casts the value.
source§impl CheckedCast<i8> for Round<f64>
impl CheckedCast<i8> for Round<f64>
source§fn checked_cast(self) -> Option<i8>
fn checked_cast(self) -> Option<i8>
Casts the value.
source§impl CheckedCast<isize> for Round<f32>
impl CheckedCast<isize> for Round<f32>
source§fn checked_cast(self) -> Option<isize>
fn checked_cast(self) -> Option<isize>
Casts the value.
source§impl CheckedCast<isize> for Round<f64>
impl CheckedCast<isize> for Round<f64>
source§fn checked_cast(self) -> Option<isize>
fn checked_cast(self) -> Option<isize>
Casts the value.
source§impl CheckedCast<u128> for Round<f32>
impl CheckedCast<u128> for Round<f32>
source§fn checked_cast(self) -> Option<u128>
fn checked_cast(self) -> Option<u128>
Casts the value.
source§impl CheckedCast<u128> for Round<f64>
impl CheckedCast<u128> for Round<f64>
source§fn checked_cast(self) -> Option<u128>
fn checked_cast(self) -> Option<u128>
Casts the value.
source§impl CheckedCast<u16> for Round<f32>
impl CheckedCast<u16> for Round<f32>
source§fn checked_cast(self) -> Option<u16>
fn checked_cast(self) -> Option<u16>
Casts the value.
source§impl CheckedCast<u16> for Round<f64>
impl CheckedCast<u16> for Round<f64>
source§fn checked_cast(self) -> Option<u16>
fn checked_cast(self) -> Option<u16>
Casts the value.
source§impl CheckedCast<u32> for Round<f32>
impl CheckedCast<u32> for Round<f32>
source§fn checked_cast(self) -> Option<u32>
fn checked_cast(self) -> Option<u32>
Casts the value.
source§impl CheckedCast<u32> for Round<f64>
impl CheckedCast<u32> for Round<f64>
source§fn checked_cast(self) -> Option<u32>
fn checked_cast(self) -> Option<u32>
Casts the value.
source§impl CheckedCast<u64> for Round<f32>
impl CheckedCast<u64> for Round<f32>
source§fn checked_cast(self) -> Option<u64>
fn checked_cast(self) -> Option<u64>
Casts the value.
source§impl CheckedCast<u64> for Round<f64>
impl CheckedCast<u64> for Round<f64>
source§fn checked_cast(self) -> Option<u64>
fn checked_cast(self) -> Option<u64>
Casts the value.
source§impl CheckedCast<u8> for Round<f32>
impl CheckedCast<u8> for Round<f32>
source§fn checked_cast(self) -> Option<u8>
fn checked_cast(self) -> Option<u8>
Casts the value.
source§impl CheckedCast<u8> for Round<f64>
impl CheckedCast<u8> for Round<f64>
source§fn checked_cast(self) -> Option<u8>
fn checked_cast(self) -> Option<u8>
Casts the value.
source§impl CheckedCast<usize> for Round<f32>
impl CheckedCast<usize> for Round<f32>
source§fn checked_cast(self) -> Option<usize>
fn checked_cast(self) -> Option<usize>
Casts the value.
source§impl CheckedCast<usize> for Round<f64>
impl CheckedCast<usize> for Round<f64>
source§fn checked_cast(self) -> Option<usize>
fn checked_cast(self) -> Option<usize>
Casts the value.
source§impl<T: Ord> Ord for Round<T>
impl<T: Ord> Ord for Round<T>
source§impl OverflowingCast<i128> for Round<f32>
impl OverflowingCast<i128> for Round<f32>
source§fn overflowing_cast(self) -> (i128, bool)
fn overflowing_cast(self) -> (i128, bool)
Casts the value.
source§impl OverflowingCast<i128> for Round<f64>
impl OverflowingCast<i128> for Round<f64>
source§fn overflowing_cast(self) -> (i128, bool)
fn overflowing_cast(self) -> (i128, bool)
Casts the value.
source§impl OverflowingCast<i16> for Round<f32>
impl OverflowingCast<i16> for Round<f32>
source§fn overflowing_cast(self) -> (i16, bool)
fn overflowing_cast(self) -> (i16, bool)
Casts the value.
source§impl OverflowingCast<i16> for Round<f64>
impl OverflowingCast<i16> for Round<f64>
source§fn overflowing_cast(self) -> (i16, bool)
fn overflowing_cast(self) -> (i16, bool)
Casts the value.
source§impl OverflowingCast<i32> for Round<f32>
impl OverflowingCast<i32> for Round<f32>
source§fn overflowing_cast(self) -> (i32, bool)
fn overflowing_cast(self) -> (i32, bool)
Casts the value.
source§impl OverflowingCast<i32> for Round<f64>
impl OverflowingCast<i32> for Round<f64>
source§fn overflowing_cast(self) -> (i32, bool)
fn overflowing_cast(self) -> (i32, bool)
Casts the value.
source§impl OverflowingCast<i64> for Round<f32>
impl OverflowingCast<i64> for Round<f32>
source§fn overflowing_cast(self) -> (i64, bool)
fn overflowing_cast(self) -> (i64, bool)
Casts the value.
source§impl OverflowingCast<i64> for Round<f64>
impl OverflowingCast<i64> for Round<f64>
source§fn overflowing_cast(self) -> (i64, bool)
fn overflowing_cast(self) -> (i64, bool)
Casts the value.
source§impl OverflowingCast<i8> for Round<f32>
impl OverflowingCast<i8> for Round<f32>
source§fn overflowing_cast(self) -> (i8, bool)
fn overflowing_cast(self) -> (i8, bool)
Casts the value.
source§impl OverflowingCast<i8> for Round<f64>
impl OverflowingCast<i8> for Round<f64>
source§fn overflowing_cast(self) -> (i8, bool)
fn overflowing_cast(self) -> (i8, bool)
Casts the value.
source§impl OverflowingCast<isize> for Round<f32>
impl OverflowingCast<isize> for Round<f32>
source§fn overflowing_cast(self) -> (isize, bool)
fn overflowing_cast(self) -> (isize, bool)
Casts the value.
source§impl OverflowingCast<isize> for Round<f64>
impl OverflowingCast<isize> for Round<f64>
source§fn overflowing_cast(self) -> (isize, bool)
fn overflowing_cast(self) -> (isize, bool)
Casts the value.
source§impl OverflowingCast<u128> for Round<f32>
impl OverflowingCast<u128> for Round<f32>
source§fn overflowing_cast(self) -> (u128, bool)
fn overflowing_cast(self) -> (u128, bool)
Casts the value.
source§impl OverflowingCast<u128> for Round<f64>
impl OverflowingCast<u128> for Round<f64>
source§fn overflowing_cast(self) -> (u128, bool)
fn overflowing_cast(self) -> (u128, bool)
Casts the value.
source§impl OverflowingCast<u16> for Round<f32>
impl OverflowingCast<u16> for Round<f32>
source§fn overflowing_cast(self) -> (u16, bool)
fn overflowing_cast(self) -> (u16, bool)
Casts the value.
source§impl OverflowingCast<u16> for Round<f64>
impl OverflowingCast<u16> for Round<f64>
source§fn overflowing_cast(self) -> (u16, bool)
fn overflowing_cast(self) -> (u16, bool)
Casts the value.
source§impl OverflowingCast<u32> for Round<f32>
impl OverflowingCast<u32> for Round<f32>
source§fn overflowing_cast(self) -> (u32, bool)
fn overflowing_cast(self) -> (u32, bool)
Casts the value.
source§impl OverflowingCast<u32> for Round<f64>
impl OverflowingCast<u32> for Round<f64>
source§fn overflowing_cast(self) -> (u32, bool)
fn overflowing_cast(self) -> (u32, bool)
Casts the value.
source§impl OverflowingCast<u64> for Round<f32>
impl OverflowingCast<u64> for Round<f32>
source§fn overflowing_cast(self) -> (u64, bool)
fn overflowing_cast(self) -> (u64, bool)
Casts the value.
source§impl OverflowingCast<u64> for Round<f64>
impl OverflowingCast<u64> for Round<f64>
source§fn overflowing_cast(self) -> (u64, bool)
fn overflowing_cast(self) -> (u64, bool)
Casts the value.
source§impl OverflowingCast<u8> for Round<f32>
impl OverflowingCast<u8> for Round<f32>
source§fn overflowing_cast(self) -> (u8, bool)
fn overflowing_cast(self) -> (u8, bool)
Casts the value.
source§impl OverflowingCast<u8> for Round<f64>
impl OverflowingCast<u8> for Round<f64>
source§fn overflowing_cast(self) -> (u8, bool)
fn overflowing_cast(self) -> (u8, bool)
Casts the value.
source§impl OverflowingCast<usize> for Round<f32>
impl OverflowingCast<usize> for Round<f32>
source§fn overflowing_cast(self) -> (usize, bool)
fn overflowing_cast(self) -> (usize, bool)
Casts the value.
source§impl OverflowingCast<usize> for Round<f64>
impl OverflowingCast<usize> for Round<f64>
source§fn overflowing_cast(self) -> (usize, bool)
fn overflowing_cast(self) -> (usize, bool)
Casts the value.
source§impl<T: PartialEq> PartialEq for Round<T>
impl<T: PartialEq> PartialEq for Round<T>
source§impl<T: PartialOrd> PartialOrd for Round<T>
impl<T: PartialOrd> PartialOrd for Round<T>
1.0.0 · source§fn 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 moresource§impl SaturatingCast<i128> for Round<f32>
impl SaturatingCast<i128> for Round<f32>
source§fn saturating_cast(self) -> i128
fn saturating_cast(self) -> i128
Casts the value.
source§impl SaturatingCast<i128> for Round<f64>
impl SaturatingCast<i128> for Round<f64>
source§fn saturating_cast(self) -> i128
fn saturating_cast(self) -> i128
Casts the value.
source§impl SaturatingCast<i16> for Round<f32>
impl SaturatingCast<i16> for Round<f32>
source§fn saturating_cast(self) -> i16
fn saturating_cast(self) -> i16
Casts the value.
source§impl SaturatingCast<i16> for Round<f64>
impl SaturatingCast<i16> for Round<f64>
source§fn saturating_cast(self) -> i16
fn saturating_cast(self) -> i16
Casts the value.
source§impl SaturatingCast<i32> for Round<f32>
impl SaturatingCast<i32> for Round<f32>
source§fn saturating_cast(self) -> i32
fn saturating_cast(self) -> i32
Casts the value.
source§impl SaturatingCast<i32> for Round<f64>
impl SaturatingCast<i32> for Round<f64>
source§fn saturating_cast(self) -> i32
fn saturating_cast(self) -> i32
Casts the value.
source§impl SaturatingCast<i64> for Round<f32>
impl SaturatingCast<i64> for Round<f32>
source§fn saturating_cast(self) -> i64
fn saturating_cast(self) -> i64
Casts the value.
source§impl SaturatingCast<i64> for Round<f64>
impl SaturatingCast<i64> for Round<f64>
source§fn saturating_cast(self) -> i64
fn saturating_cast(self) -> i64
Casts the value.
source§impl SaturatingCast<i8> for Round<f32>
impl SaturatingCast<i8> for Round<f32>
source§fn saturating_cast(self) -> i8
fn saturating_cast(self) -> i8
Casts the value.
source§impl SaturatingCast<i8> for Round<f64>
impl SaturatingCast<i8> for Round<f64>
source§fn saturating_cast(self) -> i8
fn saturating_cast(self) -> i8
Casts the value.
source§impl SaturatingCast<isize> for Round<f32>
impl SaturatingCast<isize> for Round<f32>
source§fn saturating_cast(self) -> isize
fn saturating_cast(self) -> isize
Casts the value.
source§impl SaturatingCast<isize> for Round<f64>
impl SaturatingCast<isize> for Round<f64>
source§fn saturating_cast(self) -> isize
fn saturating_cast(self) -> isize
Casts the value.
source§impl SaturatingCast<u128> for Round<f32>
impl SaturatingCast<u128> for Round<f32>
source§fn saturating_cast(self) -> u128
fn saturating_cast(self) -> u128
Casts the value.
source§impl SaturatingCast<u128> for Round<f64>
impl SaturatingCast<u128> for Round<f64>
source§fn saturating_cast(self) -> u128
fn saturating_cast(self) -> u128
Casts the value.
source§impl SaturatingCast<u16> for Round<f32>
impl SaturatingCast<u16> for Round<f32>
source§fn saturating_cast(self) -> u16
fn saturating_cast(self) -> u16
Casts the value.
source§impl SaturatingCast<u16> for Round<f64>
impl SaturatingCast<u16> for Round<f64>
source§fn saturating_cast(self) -> u16
fn saturating_cast(self) -> u16
Casts the value.
source§impl SaturatingCast<u32> for Round<f32>
impl SaturatingCast<u32> for Round<f32>
source§fn saturating_cast(self) -> u32
fn saturating_cast(self) -> u32
Casts the value.
source§impl SaturatingCast<u32> for Round<f64>
impl SaturatingCast<u32> for Round<f64>
source§fn saturating_cast(self) -> u32
fn saturating_cast(self) -> u32
Casts the value.
source§impl SaturatingCast<u64> for Round<f32>
impl SaturatingCast<u64> for Round<f32>
source§fn saturating_cast(self) -> u64
fn saturating_cast(self) -> u64
Casts the value.
source§impl SaturatingCast<u64> for Round<f64>
impl SaturatingCast<u64> for Round<f64>
source§fn saturating_cast(self) -> u64
fn saturating_cast(self) -> u64
Casts the value.
source§impl SaturatingCast<u8> for Round<f32>
impl SaturatingCast<u8> for Round<f32>
source§fn saturating_cast(self) -> u8
fn saturating_cast(self) -> u8
Casts the value.
source§impl SaturatingCast<u8> for Round<f64>
impl SaturatingCast<u8> for Round<f64>
source§fn saturating_cast(self) -> u8
fn saturating_cast(self) -> u8
Casts the value.
source§impl SaturatingCast<usize> for Round<f32>
impl SaturatingCast<usize> for Round<f32>
source§fn saturating_cast(self) -> usize
fn saturating_cast(self) -> usize
Casts the value.
source§impl SaturatingCast<usize> for Round<f64>
impl SaturatingCast<usize> for Round<f64>
source§fn saturating_cast(self) -> usize
fn saturating_cast(self) -> usize
Casts the value.
source§impl UnwrappedCast<Wrapping<i128>> for Round<f32>
impl UnwrappedCast<Wrapping<i128>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<i128>
fn unwrapped_cast(self) -> Wrapping<i128>
Casts the value.
source§impl UnwrappedCast<Wrapping<i128>> for Round<f64>
impl UnwrappedCast<Wrapping<i128>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<i128>
fn unwrapped_cast(self) -> Wrapping<i128>
Casts the value.
source§impl UnwrappedCast<Wrapping<i16>> for Round<f32>
impl UnwrappedCast<Wrapping<i16>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<i16>
fn unwrapped_cast(self) -> Wrapping<i16>
Casts the value.
source§impl UnwrappedCast<Wrapping<i16>> for Round<f64>
impl UnwrappedCast<Wrapping<i16>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<i16>
fn unwrapped_cast(self) -> Wrapping<i16>
Casts the value.
source§impl UnwrappedCast<Wrapping<i32>> for Round<f32>
impl UnwrappedCast<Wrapping<i32>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<i32>
fn unwrapped_cast(self) -> Wrapping<i32>
Casts the value.
source§impl UnwrappedCast<Wrapping<i32>> for Round<f64>
impl UnwrappedCast<Wrapping<i32>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<i32>
fn unwrapped_cast(self) -> Wrapping<i32>
Casts the value.
source§impl UnwrappedCast<Wrapping<i64>> for Round<f32>
impl UnwrappedCast<Wrapping<i64>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<i64>
fn unwrapped_cast(self) -> Wrapping<i64>
Casts the value.
source§impl UnwrappedCast<Wrapping<i64>> for Round<f64>
impl UnwrappedCast<Wrapping<i64>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<i64>
fn unwrapped_cast(self) -> Wrapping<i64>
Casts the value.
source§impl UnwrappedCast<Wrapping<i8>> for Round<f32>
impl UnwrappedCast<Wrapping<i8>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<i8>
fn unwrapped_cast(self) -> Wrapping<i8>
Casts the value.
source§impl UnwrappedCast<Wrapping<i8>> for Round<f64>
impl UnwrappedCast<Wrapping<i8>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<i8>
fn unwrapped_cast(self) -> Wrapping<i8>
Casts the value.
source§impl UnwrappedCast<Wrapping<isize>> for Round<f32>
impl UnwrappedCast<Wrapping<isize>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<isize>
fn unwrapped_cast(self) -> Wrapping<isize>
Casts the value.
source§impl UnwrappedCast<Wrapping<isize>> for Round<f64>
impl UnwrappedCast<Wrapping<isize>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<isize>
fn unwrapped_cast(self) -> Wrapping<isize>
Casts the value.
source§impl UnwrappedCast<Wrapping<u128>> for Round<f32>
impl UnwrappedCast<Wrapping<u128>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<u128>
fn unwrapped_cast(self) -> Wrapping<u128>
Casts the value.
source§impl UnwrappedCast<Wrapping<u128>> for Round<f64>
impl UnwrappedCast<Wrapping<u128>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<u128>
fn unwrapped_cast(self) -> Wrapping<u128>
Casts the value.
source§impl UnwrappedCast<Wrapping<u16>> for Round<f32>
impl UnwrappedCast<Wrapping<u16>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<u16>
fn unwrapped_cast(self) -> Wrapping<u16>
Casts the value.
source§impl UnwrappedCast<Wrapping<u16>> for Round<f64>
impl UnwrappedCast<Wrapping<u16>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<u16>
fn unwrapped_cast(self) -> Wrapping<u16>
Casts the value.
source§impl UnwrappedCast<Wrapping<u32>> for Round<f32>
impl UnwrappedCast<Wrapping<u32>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<u32>
fn unwrapped_cast(self) -> Wrapping<u32>
Casts the value.
source§impl UnwrappedCast<Wrapping<u32>> for Round<f64>
impl UnwrappedCast<Wrapping<u32>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<u32>
fn unwrapped_cast(self) -> Wrapping<u32>
Casts the value.
source§impl UnwrappedCast<Wrapping<u64>> for Round<f32>
impl UnwrappedCast<Wrapping<u64>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<u64>
fn unwrapped_cast(self) -> Wrapping<u64>
Casts the value.
source§impl UnwrappedCast<Wrapping<u64>> for Round<f64>
impl UnwrappedCast<Wrapping<u64>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<u64>
fn unwrapped_cast(self) -> Wrapping<u64>
Casts the value.
source§impl UnwrappedCast<Wrapping<u8>> for Round<f32>
impl UnwrappedCast<Wrapping<u8>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<u8>
fn unwrapped_cast(self) -> Wrapping<u8>
Casts the value.
source§impl UnwrappedCast<Wrapping<u8>> for Round<f64>
impl UnwrappedCast<Wrapping<u8>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<u8>
fn unwrapped_cast(self) -> Wrapping<u8>
Casts the value.
source§impl UnwrappedCast<Wrapping<usize>> for Round<f32>
impl UnwrappedCast<Wrapping<usize>> for Round<f32>
source§fn unwrapped_cast(self) -> Wrapping<usize>
fn unwrapped_cast(self) -> Wrapping<usize>
Casts the value.
source§impl UnwrappedCast<Wrapping<usize>> for Round<f64>
impl UnwrappedCast<Wrapping<usize>> for Round<f64>
source§fn unwrapped_cast(self) -> Wrapping<usize>
fn unwrapped_cast(self) -> Wrapping<usize>
Casts the value.
source§impl UnwrappedCast<i128> for Round<f32>
impl UnwrappedCast<i128> for Round<f32>
source§fn unwrapped_cast(self) -> i128
fn unwrapped_cast(self) -> i128
Casts the value.
source§impl UnwrappedCast<i128> for Round<f64>
impl UnwrappedCast<i128> for Round<f64>
source§fn unwrapped_cast(self) -> i128
fn unwrapped_cast(self) -> i128
Casts the value.
source§impl UnwrappedCast<i16> for Round<f32>
impl UnwrappedCast<i16> for Round<f32>
source§fn unwrapped_cast(self) -> i16
fn unwrapped_cast(self) -> i16
Casts the value.
source§impl UnwrappedCast<i16> for Round<f64>
impl UnwrappedCast<i16> for Round<f64>
source§fn unwrapped_cast(self) -> i16
fn unwrapped_cast(self) -> i16
Casts the value.
source§impl UnwrappedCast<i32> for Round<f32>
impl UnwrappedCast<i32> for Round<f32>
source§fn unwrapped_cast(self) -> i32
fn unwrapped_cast(self) -> i32
Casts the value.
source§impl UnwrappedCast<i32> for Round<f64>
impl UnwrappedCast<i32> for Round<f64>
source§fn unwrapped_cast(self) -> i32
fn unwrapped_cast(self) -> i32
Casts the value.
source§impl UnwrappedCast<i64> for Round<f32>
impl UnwrappedCast<i64> for Round<f32>
source§fn unwrapped_cast(self) -> i64
fn unwrapped_cast(self) -> i64
Casts the value.
source§impl UnwrappedCast<i64> for Round<f64>
impl UnwrappedCast<i64> for Round<f64>
source§fn unwrapped_cast(self) -> i64
fn unwrapped_cast(self) -> i64
Casts the value.
source§impl UnwrappedCast<i8> for Round<f32>
impl UnwrappedCast<i8> for Round<f32>
source§fn unwrapped_cast(self) -> i8
fn unwrapped_cast(self) -> i8
Casts the value.
source§impl UnwrappedCast<i8> for Round<f64>
impl UnwrappedCast<i8> for Round<f64>
source§fn unwrapped_cast(self) -> i8
fn unwrapped_cast(self) -> i8
Casts the value.
source§impl UnwrappedCast<isize> for Round<f32>
impl UnwrappedCast<isize> for Round<f32>
source§fn unwrapped_cast(self) -> isize
fn unwrapped_cast(self) -> isize
Casts the value.
source§impl UnwrappedCast<isize> for Round<f64>
impl UnwrappedCast<isize> for Round<f64>
source§fn unwrapped_cast(self) -> isize
fn unwrapped_cast(self) -> isize
Casts the value.
source§impl UnwrappedCast<u128> for Round<f32>
impl UnwrappedCast<u128> for Round<f32>
source§fn unwrapped_cast(self) -> u128
fn unwrapped_cast(self) -> u128
Casts the value.
source§impl UnwrappedCast<u128> for Round<f64>
impl UnwrappedCast<u128> for Round<f64>
source§fn unwrapped_cast(self) -> u128
fn unwrapped_cast(self) -> u128
Casts the value.
source§impl UnwrappedCast<u16> for Round<f32>
impl UnwrappedCast<u16> for Round<f32>
source§fn unwrapped_cast(self) -> u16
fn unwrapped_cast(self) -> u16
Casts the value.
source§impl UnwrappedCast<u16> for Round<f64>
impl UnwrappedCast<u16> for Round<f64>
source§fn unwrapped_cast(self) -> u16
fn unwrapped_cast(self) -> u16
Casts the value.
source§impl UnwrappedCast<u32> for Round<f32>
impl UnwrappedCast<u32> for Round<f32>
source§fn unwrapped_cast(self) -> u32
fn unwrapped_cast(self) -> u32
Casts the value.
source§impl UnwrappedCast<u32> for Round<f64>
impl UnwrappedCast<u32> for Round<f64>
source§fn unwrapped_cast(self) -> u32
fn unwrapped_cast(self) -> u32
Casts the value.
source§impl UnwrappedCast<u64> for Round<f32>
impl UnwrappedCast<u64> for Round<f32>
source§fn unwrapped_cast(self) -> u64
fn unwrapped_cast(self) -> u64
Casts the value.
source§impl UnwrappedCast<u64> for Round<f64>
impl UnwrappedCast<u64> for Round<f64>
source§fn unwrapped_cast(self) -> u64
fn unwrapped_cast(self) -> u64
Casts the value.
source§impl UnwrappedCast<u8> for Round<f32>
impl UnwrappedCast<u8> for Round<f32>
source§fn unwrapped_cast(self) -> u8
fn unwrapped_cast(self) -> u8
Casts the value.
source§impl UnwrappedCast<u8> for Round<f64>
impl UnwrappedCast<u8> for Round<f64>
source§fn unwrapped_cast(self) -> u8
fn unwrapped_cast(self) -> u8
Casts the value.
source§impl UnwrappedCast<usize> for Round<f32>
impl UnwrappedCast<usize> for Round<f32>
source§fn unwrapped_cast(self) -> usize
fn unwrapped_cast(self) -> usize
Casts the value.
source§impl UnwrappedCast<usize> for Round<f64>
impl UnwrappedCast<usize> for Round<f64>
source§fn unwrapped_cast(self) -> usize
fn unwrapped_cast(self) -> usize
Casts the value.
source§impl WrappingCast<i128> for Round<f32>
impl WrappingCast<i128> for Round<f32>
source§fn wrapping_cast(self) -> i128
fn wrapping_cast(self) -> i128
Casts the value.
source§impl WrappingCast<i128> for Round<f64>
impl WrappingCast<i128> for Round<f64>
source§fn wrapping_cast(self) -> i128
fn wrapping_cast(self) -> i128
Casts the value.
source§impl WrappingCast<i16> for Round<f32>
impl WrappingCast<i16> for Round<f32>
source§fn wrapping_cast(self) -> i16
fn wrapping_cast(self) -> i16
Casts the value.
source§impl WrappingCast<i16> for Round<f64>
impl WrappingCast<i16> for Round<f64>
source§fn wrapping_cast(self) -> i16
fn wrapping_cast(self) -> i16
Casts the value.
source§impl WrappingCast<i32> for Round<f32>
impl WrappingCast<i32> for Round<f32>
source§fn wrapping_cast(self) -> i32
fn wrapping_cast(self) -> i32
Casts the value.
source§impl WrappingCast<i32> for Round<f64>
impl WrappingCast<i32> for Round<f64>
source§fn wrapping_cast(self) -> i32
fn wrapping_cast(self) -> i32
Casts the value.
source§impl WrappingCast<i64> for Round<f32>
impl WrappingCast<i64> for Round<f32>
source§fn wrapping_cast(self) -> i64
fn wrapping_cast(self) -> i64
Casts the value.
source§impl WrappingCast<i64> for Round<f64>
impl WrappingCast<i64> for Round<f64>
source§fn wrapping_cast(self) -> i64
fn wrapping_cast(self) -> i64
Casts the value.
source§impl WrappingCast<i8> for Round<f32>
impl WrappingCast<i8> for Round<f32>
source§fn wrapping_cast(self) -> i8
fn wrapping_cast(self) -> i8
Casts the value.
source§impl WrappingCast<i8> for Round<f64>
impl WrappingCast<i8> for Round<f64>
source§fn wrapping_cast(self) -> i8
fn wrapping_cast(self) -> i8
Casts the value.
source§impl WrappingCast<isize> for Round<f32>
impl WrappingCast<isize> for Round<f32>
source§fn wrapping_cast(self) -> isize
fn wrapping_cast(self) -> isize
Casts the value.
source§impl WrappingCast<isize> for Round<f64>
impl WrappingCast<isize> for Round<f64>
source§fn wrapping_cast(self) -> isize
fn wrapping_cast(self) -> isize
Casts the value.
source§impl WrappingCast<u128> for Round<f32>
impl WrappingCast<u128> for Round<f32>
source§fn wrapping_cast(self) -> u128
fn wrapping_cast(self) -> u128
Casts the value.
source§impl WrappingCast<u128> for Round<f64>
impl WrappingCast<u128> for Round<f64>
source§fn wrapping_cast(self) -> u128
fn wrapping_cast(self) -> u128
Casts the value.
source§impl WrappingCast<u16> for Round<f32>
impl WrappingCast<u16> for Round<f32>
source§fn wrapping_cast(self) -> u16
fn wrapping_cast(self) -> u16
Casts the value.
source§impl WrappingCast<u16> for Round<f64>
impl WrappingCast<u16> for Round<f64>
source§fn wrapping_cast(self) -> u16
fn wrapping_cast(self) -> u16
Casts the value.
source§impl WrappingCast<u32> for Round<f32>
impl WrappingCast<u32> for Round<f32>
source§fn wrapping_cast(self) -> u32
fn wrapping_cast(self) -> u32
Casts the value.
source§impl WrappingCast<u32> for Round<f64>
impl WrappingCast<u32> for Round<f64>
source§fn wrapping_cast(self) -> u32
fn wrapping_cast(self) -> u32
Casts the value.
source§impl WrappingCast<u64> for Round<f32>
impl WrappingCast<u64> for Round<f32>
source§fn wrapping_cast(self) -> u64
fn wrapping_cast(self) -> u64
Casts the value.
source§impl WrappingCast<u64> for Round<f64>
impl WrappingCast<u64> for Round<f64>
source§fn wrapping_cast(self) -> u64
fn wrapping_cast(self) -> u64
Casts the value.
source§impl WrappingCast<u8> for Round<f32>
impl WrappingCast<u8> for Round<f32>
source§fn wrapping_cast(self) -> u8
fn wrapping_cast(self) -> u8
Casts the value.
source§impl WrappingCast<u8> for Round<f64>
impl WrappingCast<u8> for Round<f64>
source§fn wrapping_cast(self) -> u8
fn wrapping_cast(self) -> u8
Casts the value.
source§impl WrappingCast<usize> for Round<f32>
impl WrappingCast<usize> for Round<f32>
source§fn wrapping_cast(self) -> usize
fn wrapping_cast(self) -> usize
Casts the value.
source§impl WrappingCast<usize> for Round<f64>
impl WrappingCast<usize> for Round<f64>
source§fn wrapping_cast(self) -> usize
fn wrapping_cast(self) -> usize
Casts the value.
impl<T: Copy> Copy for Round<T>
impl<T: Eq> Eq for Round<T>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.