CheckedArith

Trait CheckedArith 

Source
pub trait CheckedArith:
    Copy
    + Clone
    + Debug
    + 'static {
    // Required methods
    fn checked_add(self, rhs: Self) -> Result<Self, CoordinateOverflow>;
    fn checked_sub(self, rhs: Self) -> Result<Self, CoordinateOverflow>;
    fn checked_neg(self) -> Result<Self, CoordinateOverflow>;
}

Required Methods§

Source

fn checked_add(self, rhs: Self) -> Result<Self, CoordinateOverflow>

Source

fn checked_sub(self, rhs: Self) -> Result<Self, CoordinateOverflow>

Source

fn checked_neg(self) -> Result<Self, CoordinateOverflow>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CheckedArith for f64

Source§

impl CheckedArith for i32

Implementors§