Wrappers of the standard collection library for generic programming.
This library categorizes operations on collections such as sets, tuples or vectors. The goal is to allow designing generic algorithms by specifying trait bounds on type parameters.
It acts as a temporary substitute and will be replaced when proper generic supports will be added on standard collections. Generic operations are implemented on wrappers of the standard collections (available in
wrappers::*), this is due to name conflicts between existing methods and traits function names.
If the feature
nightly is defined (use
cargo build --features="nightly"), then some of the traits are implemented using specialization.
stable they are implemented for every type satisfying some trait bounds, but a user cannot override the definitions.
pub use kind::*;
pub use queue::*;
pub use stack::*;
pub use wrappers::hash_set::*;
pub use wrappers::btree_set::*;
pub use wrappers::bit_set::*;
pub use wrappers::optional::*;
pub use wrappers::vector::*;
pub use wrappers::vector_deque::*;
We distinguish between ground and non-ground types. A ground type is basically a type that is not parametrized by a type parameter. This distinction is done for implementing binary operations on types.