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
Collection types implement all of the traits in this crate.
Length
Obtain the length of a collection.
Truncate
Truncate the collection to the provided length.
TryCollect
TryCollect is an extension to Iterator which allows for performing a fallible collection into a collection type.
TryExtend
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.
TryFromIterator
Try to build a collection type from an Iterator.
TryPush
Try to push an element onto a collection