Module frunk_core::labelled
[−]
[src]
This module holds the machinery behind LabelledGeneric.
A LabelledGeneric instance is pretty much exactly the same as a Generic instance, except that the generic representation should contain information about field names.
Having a separate trait for LabelledGenerics gives us the freedom to derive both lablled and non-labelled generic type class instances for our types.
Asides from the main LabelledGeneric trait, this module holds helper methods that allow users to use LabelledGeneric without using universal function call syntax.
In addition, this module holds macro-generated enums that map to letters in field names (identifiers).
Structs
Field |
A Label contains a type-level Name, a runtime value, and
a reference to a |
Enums
A | |
B | |
C | |
D | |
E | |
F | |
G | |
H | |
I | |
J | |
K | |
L | |
M | |
N | |
O | |
P | |
Q | |
R | |
S | |
T | |
U | |
V | |
W | |
X | |
Y | |
Z | |
_0 | |
_1 | |
_2 | |
_3 | |
_4 | |
_5 | |
_6 | |
_7 | |
_8 | |
_9 | |
__ | |
a | |
b | |
c | |
d | |
e | |
f | |
g | |
h | |
i | |
j | |
k | |
l | |
m | |
n | |
o | |
p | |
q | |
r | |
s | |
t | |
u | |
v | |
w | |
x | |
y | |
z |
Traits
IntoUnlabelled |
Trait for turning a Field HList into an un-labelled HList |
LabelledGeneric |
A trait that converts from a type to a labelled generic representation |
Functions
field_with_name |
Returns a new Field for a given value and custom name. |
from_labelled_generic |
Given a labelled generic Representation of an A, returns A |
into_labelled_generic |
Given an A, returns its labelled generic Representation |
labelled_convert_from |
Converts one type into another assuming they have the same labelled generic Representation |
sculpted_convert_from |
Converts from one type into another assuming that their labelled generic representations can be sculpted into each other. |