Crate collectable

Source
Expand description

This crate provides a set of traits that can be used to abstract over various collection types. In particular, it supports traits for fallible operations (such as TryExtend) which are useful for supporting fixed-capacity containers, such as heapless::Vec or tinyvec::Array.

Traits§

  • Collection types implement all of the traits in this crate.
  • Obtain the length of a collection.
  • Truncate the collection to the provided length.
  • TryCollect is an extension to Iterator which allows for performing a fallible collection into a collection type.
  • Fallible equivalent of core::iter::Extend - extends a collection with the contents of an iterator, but with the option to return an error in the event the container’s capacity has been exceeded.
  • Try to build a collection type from an Iterator.
  • Try to push an element onto a collection