pub enum Overflow {
Wrap,
Sat,
Fail,
}Expand description
What to do about a value that will not fit.
Variants§
Wrap
Keep the low bits, which is what a counter that is allowed to lap does.
Sat
Stop at the end of the range.
Fail
Do nothing and answer nothing.
Implementations§
Trait Implementations§
impl Copy for Overflow
impl Eq for Overflow
impl StructuralPartialEq for Overflow
Auto Trait Implementations§
impl Freeze for Overflow
impl RefUnwindSafe for Overflow
impl Send for Overflow
impl Sync for Overflow
impl Unpin for Overflow
impl UnsafeUnpin for Overflow
impl UnwindSafe for Overflow
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