pub struct Unchecked<T, D = WithoutDeref> { /* private fields */ }
Expand description
Intermediate result of artimetic operations on Checked
value that might contain overflow
At any point contains either a value of the inner type T
,
or a marker that overflow was detected and any subsequent
artimetic operations will keep resulting
in overflow, similiarly to how NaN behaves.
Implementations§
Trait Implementations§
Source§impl<T, D, Rhs> Add<Rhs> for Unchecked<T, D>where
T: CheckedAdd<Rhs>,
impl<T, D, Rhs> Add<Rhs> for Unchecked<T, D>where
T: CheckedAdd<Rhs>,
Source§impl<T, D, Rhs> Div<Rhs> for Unchecked<T, D>where
T: CheckedDiv<Rhs>,
impl<T, D, Rhs> Div<Rhs> for Unchecked<T, D>where
T: CheckedDiv<Rhs>,
Source§impl<T, D, Rhs> Mul<Rhs> for Unchecked<T, D>where
T: CheckedMul<Rhs>,
impl<T, D, Rhs> Mul<Rhs> for Unchecked<T, D>where
T: CheckedMul<Rhs>,
Source§impl<T, D, Rhs> Sub<Rhs> for Unchecked<T, D>where
T: CheckedSub<Rhs>,
impl<T, D, Rhs> Sub<Rhs> for Unchecked<T, D>where
T: CheckedSub<Rhs>,
impl<T, D> Copy for Unchecked<T, D>where
T: Copy,
Auto Trait Implementations§
impl<T, D> Freeze for Unchecked<T, D>where
T: Freeze,
impl<T, D> RefUnwindSafe for Unchecked<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Send for Unchecked<T, D>
impl<T, D> Sync for Unchecked<T, D>
impl<T, D> Unpin for Unchecked<T, D>
impl<T, D> UnwindSafe for Unchecked<T, D>where
T: UnwindSafe,
D: 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