Module list_traits
Expand description
Traits for working with type lists and type information. Builds and borrows heterogeneous lists without erasing their field types.
use cel_runtime::{IntoTupleList, List, TypeIdIterator};
let list = (String::from("first"), 7u8).into_tuple_list();
assert_eq!(list.head(), "first");
assert_eq!(*list.tail().head(), 7);
assert_eq!(list.len(), 2);
assert!(!list.is_empty());
assert_eq!(list.reverse().reverse().append(()).len(), 2);
assert_eq!(TypeIdIterator::<(String, (u8, ()))>::default().count(), 2);Structs§
- List
Type Iterator - Iterator over type-level
Listvalues producing properties viaP. - Undefined
- Marker type representing the head of an empty list.
Traits§
- Empty
List - Trait implemented by empty lists to support list construction.
- Into
List - Moves source fields into a type-level
List. - List
- Represents a finite heterogeneous list with source-ordered heads and tails.
- List
Index - Indexing for lists using typenum-based indices and ranges.
- List
Type Iterator Advance - Advance function provider used by
ListTypeIterator. - List
Type Property - Property generator for iterating over type-level lists.
- ToList
- Converts to a type-level
Listwithout consuming the source.
Type Aliases§
- Item
- Names the field or sublist type selected by index
Nin listL. - Reverse
List - Convenience alias for reversing a
Listonto its empty counterpart. - Type
IdIterator - Iterator that yields the
TypeIdof each head in theList.