pub trait ConstCheckedSub: Sized + ConstOverflowingSub {
// Required method
fn checked_sub(&self, v: &Self) -> Option<Self>;
}Expand description
Const-compatible checked subtraction.
Required Methods§
Sourcefn checked_sub(&self, v: &Self) -> Option<Self>
fn checked_sub(&self, v: &Self) -> Option<Self>
Checked subtraction. Returns None if overflow occurred.
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.