pub trait RangeInclusiveExt<Idx> {
// Required methods
fn checked_len(&self) -> Option<Idx>;
fn saturating_len(&self) -> Idx;
}Expand description
A trait defining helper methods for RangeInclusive (start..=end)
Required Methods§
Sourcefn checked_len(&self) -> Option<Idx>
fn checked_len(&self) -> Option<Idx>
Computes the length of the RangeInclusive, checking for underflow and overflow.
Sourcefn saturating_len(&self) -> Idx
fn saturating_len(&self) -> Idx
Computes the length of the RangeInclusive, saturating in case of underflow or overflow.