Expand description
ULE impls for tuples.
Rust does not guarantee the layout of tuples, so ZeroVec defines its own tuple ULE types.
Impls are defined for tuples of up to 6 elements. For longer tuples, use a custom struct
with #[make_ule]
.
§Examples
use zerovec::ZeroVec;
// ZeroVec of tuples!
let zerovec: ZeroVec<(u32, char)> = [(1, 'a'), (1234901, '啊'), (100, 'अ')]
.iter()
.copied()
.collect();
assert_eq!(zerovec.get(1), Some((1234901, '啊')));
Structs§
- ULE type for tuples with 2 elements.
- ULE type for tuples with 3 elements.
- ULE type for tuples with 4 elements.
- ULE type for tuples with 5 elements.
- ULE type for tuples with 6 elements.