Derive Macro trait_based_collection_macros::FromIterator
source · [−]#[derive(FromIterator)]
Expand description
This macro is used to derive the FromIterator
a standard implementation for all the data
structures that implement the Collection
trait. This macro will automatically take into
account the size of the iterator and create a new instance of the data structure with the
appropriate capacity. This is useful for collections that have a fixed size (that implement the
FixedSizeCollection
trait) as it will prevent the collection from having to resize itself
multiple times.
Panics
This macro will panic if the input could not be properly parsed using the syn
crate.