pub struct Exact;Expand description
Exact conversion only
Successful conversions using this “rounding” mode must preserve the value exactly.
Example: 2.0_f32 may convert to 2_i32. 2.1_f32 is not convertible to
i32.
Another example: u128::MAX (which is larger than f32::MAX) may not
be converted to f32 with Exact rounding (with other modes it may
round to f32::INFINITY).
Trait Implementations§
Source§impl<S, T: ConvExact<S>> ConvTo<S, Exact> for T
impl<S, T: ConvExact<S>> ConvTo<S, Exact> for T
impl Copy for Exact
Auto Trait Implementations§
impl Freeze for Exact
impl RefUnwindSafe for Exact
impl Send for Exact
impl Sync for Exact
impl Unpin for Exact
impl UnsafeUnpin for Exact
impl UnwindSafe for Exact
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<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, <S as CastApprox<T>>::Error>
fn try_cast_approx(self) -> Result<T, <S as CastApprox<T>>::Error>
Try approximate conversion from
Self to T