Module recursive

Source
Expand description

A generic wrapper which can be used to represent recursive types. Supports conversion from and to tuples of the same size.

Macrosยง

gen_recursive_type ๐Ÿ”’
Generates the recursive type corresponding to this tuple:
gen_recursive_value ๐Ÿ”’
Generates the recursive value corresponding to the given indices:
gen_tuple_value ๐Ÿ”’
Generates the into_tuple value corresponding to the given type names:
generate_single ๐Ÿ”’
Generate the trait implementations given a sequence of type names in both directions and the indices backwards:

Structsยง

NoneMore
No more recursion. Can be used within any Recursive<NoneMore, YourValue> type.
Recursive
A recursive type-level linked list of Value entries. Mainly used to represent an arbitrary number of channels. The recursive architecture removes the need to implement traits for many different tuples.

Traitsยง

IntoNonRecursive
Convert this recursive type into a tuple. This is nice as it will require less typing for the same type. A type will be converted to the specified Self::NonRecursive type.
IntoRecursive
Create a recursive type from this tuple.
IntoTuple
Convert this recursive type into a tuple. This is nice as it will require less typing for the same type. A type might or might not be convertible to the specified Tuple type.