Module frunk_core::hlist
[−]
[src]
Module that holds HList data structures and implementations
Typically, you would want to use the hlist!
macro to make it easier
for you to use HList.
let h = hlist![1, "hi"]; assert_eq!(h.length(), 2); let (a, b) = h.into_tuple2(); assert_eq!(a, 1); assert_eq!(b, "hi");
Structs
HCons |
Represents the most basic non-empty HList. Its value is held in |
HNil |
Represents the right-most end of a heterogeneous list |
Here |
Largely lifted from https://github.com/Sgeo/hlist/blob/master/src/lib.rs#L30
Used as an index into an |
There |
Used as an index into an |
Traits
HFoldRightable |
Foldr for HLists |
HList |
Typeclass for HList-y behaviour |
HMappable |
Trail that allow for mapping over a data structure using mapping functions stored in another data structure |
HZipFoldLeftable |
Left fold for a given data structure |
IntoReverse |
Trait that allows for reversing a given data structure. |
IntoTuple2 |
Trait for things that can be turned into a Tuple 2 (pair) |
Selector |
Trait for retrieving an HList element by type |
Functions
h_cons |
Takes an element and an Hlist and returns another one with the element prepended to the original list. The original list is consumed |