OverflowingSub

Trait OverflowingSub 

Source
pub trait OverflowingSub: Sized {
    // Required method
    fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>;
}
Expand description

Overflowing subtraction, returning the result of addition or ArithmeticsError::SubtractingOverflow.

Required Methods§

Source

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Overflowing subtraction. Compute self - rhs, returns the result or error if overflowed.

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 OverflowingSub for i8

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for i16

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for i32

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for i64

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for u8

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for u16

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for u32

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for u64

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for U128

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for U256

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Source§

impl OverflowingSub for U512

Source§

fn overflowing_sub(self, rhs: Self) -> Result<Self, ExecutionError>

Implementors§