Trait SaturatingSub

trait SaturatingSub: Sized + Sub<Self, Output = Self>

Performs subtraction that saturates at the numeric bounds instead of overflowing.

Required Methods

fn saturating_sub(self: &Self, v: &Self) -> Self

Saturating subtraction. Computes self - other, saturating at the relevant high or low boundary of the type.

Implementors