Crate len_trait

Source
Expand description

This crate generalises traits over the len and capacity methods found in most collections.

Methods that are included:

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:

The index module provides:

§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.

Re-exports§

Modules§

  • Traits involving the capacity of a collection.
  • Traits involving collections which index over a particular type.
  • Traits involving the length of a collection.