Trait CheckedSub

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

Performs subtraction that returns None instead of wrapping around on underflow.

Required Methods

fn checked_sub(self: &Self, v: &Self) -> Option<Self>

Subtracts two numbers, checking for underflow. If underflow happens, None is returned.

Implementors