#[repr(u8)]pub enum DivZero {
Error = 0,
Trap = 1,
}Expand description
The div_zero policy: what integer div, rem, floor_div, and
floor_mod do when the divisor is zero.
§Examples
use bytecode_lang::DivZero;
assert_eq!(DivZero::default(), DivZero::Error);Variants§
Error = 0
Raise DivByZero (E0002) through the language’s error model.
Trap = 1
Abort the program with DivByZero (E0002); not catchable.
Implementations§
Trait Implementations§
impl Copy for DivZero
impl Eq for DivZero
Source§impl Ord for DivZero
impl Ord for DivZero
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DivZero
impl PartialOrd for DivZero
impl StructuralPartialEq for DivZero
Auto Trait Implementations§
impl Freeze for DivZero
impl RefUnwindSafe for DivZero
impl Send for DivZero
impl Sync for DivZero
impl Unpin for DivZero
impl UnsafeUnpin for DivZero
impl UnwindSafe for DivZero
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