Expand description
This crate generalises traits over the len and capacity methods found in most collections.
Methods that are included:
capacityclearis_emptylenreserve_exactreserveshrink_to_fitsplit_at_mutsplit_atsplit_offtruncatewith_capacity
Additionally, the traits IndexRange<Idx> and IndexRangeMut<Idx> are provided for
“consistent slicing,” i.e. slicing over all range types.
§Modules
The len module provides:
The capacity module provides:
CapacityMut, which requiresWithCapacityWithCapacity, which requiresCapacityCapacity, which requiresLen.
The index module provides:
IndexRange<Idx>, automatically implemented fromIndex<Idx>IndexRangeMut<Idx>, automatically implemented fromIndexMut<Idx>SplitAt<Idx>, which requiresIndexRange<Idx>SplitAtMut<Idx>, which requiresIndexRangeMut<Idx>
§Features
The alloc and std features offer different tiers of implementations for different
collections. The std feature automatically enables alloc. Although the std feature is the
default, disabling it will enable no_std.