pub struct DivideByZero;Expand description
What a division by zero produces, since this crate has no exceptions yet.
The interpreter turns it into ZeroDivisionError. It is a type rather than
an Option so that a caller cannot read the None as “no answer” and carry
on, which for // and % would be a wrong answer rather than a missing one.
Trait Implementations§
Source§impl Clone for DivideByZero
impl Clone for DivideByZero
Source§fn clone(&self) -> DivideByZero
fn clone(&self) -> DivideByZero
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DivideByZero
Source§impl Debug for DivideByZero
impl Debug for DivideByZero
impl Eq for DivideByZero
Source§impl PartialEq for DivideByZero
impl PartialEq for DivideByZero
impl StructuralPartialEq for DivideByZero
Auto Trait Implementations§
impl Freeze for DivideByZero
impl RefUnwindSafe for DivideByZero
impl Send for DivideByZero
impl Sync for DivideByZero
impl Unpin for DivideByZero
impl UnsafeUnpin for DivideByZero
impl UnwindSafe for DivideByZero
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