Skip to main content

Module ext

Module ext 

Source
Expand description

Extension traits adding small conveniences to std and num types.

Traits§

CloneAnd
Adds clone_and(f): clone self, apply the mutation f, and return the modified clone — for building variants without mutating the original.
DivRound
Division rounded to the nearest integer.
IntoDigits
Decompose a non-negative integer into its base-10 digits.
IteratorExt
Extension methods on Iterator.
RangeExt
Shift the endpoints of a Range or RangeInclusive by independent left/right offsets.

Functions§

empty_range
The empty RangeInclusive<isize>, for a grading support with no elements. start > end, so it yields nothing and contains is always false.