Crates.io | const-size-flatten |
lib.rs | const-size-flatten |
version | 0.5.0 |
source | src |
created_at | 2023-03-02 15:35:04.794027 |
updated_at | 2023-11-06 01:08:05.439197 |
description | Flatten and FlatMap with constant inner iterator size |
homepage | |
repository | https://github.com/schuelermine/const-size-flatten |
max_upload_size | |
id | 798948 |
size | 15,513 |
Flatten
and FlatMap
with constant inner iterator sizeThis Rust package provides ConstSizeFlatten
and ConstSizeFlatMap
which make use of the also provided ConstSizeIntoIterator
to know how many items they will yield.
Note that core
& std
already provide this functionality for some types through a hack using specialization. This crate’s contribution is that the trait ConstSizeIntoIterator
is public and the functionality is therefore extensible.