Skip to main content

SubChecked

pub trait SubChecked<Rhs: ?Sized = Self> {
    type Output;

    // Required method
    fn sub_checked(&self, rhs: &Rhs) -> Self::Output;
}
Expand description

Binary operator for subtracting two values, enforcing an underflow never occurs.

Required Associated Types§

Required Methods§

Source

fn sub_checked(&self, rhs: &Rhs) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§