Trait CheckedSub

Source
pub trait CheckedSub<Rhs = Self> {
    type Output;

    // Required method
    const fn checked_sub(self, rhs: Rhs) -> Option<Self::Output>;
}
Expand description

✅ Checked subtraction. Returns None if the result overflows.

§Panics

This function never panics.

Required Associated Types§

Required Methods§

Source

const fn checked_sub(self, rhs: Rhs) -> Option<Self::Output>

Implementors§