Expand description
Frunk Proc Macro internals
This library holds common logic for procedural macros used by frunk
Links:
Structs§
- Field
Binding - Field
Bindings - Represents the binding of a struct or enum variant’s fields to a corresponding set of similarly named local variables.
- Variant
Binding - Variant
Bindings
Enums§
Functions§
- build_
coprod_ constr - Given an index and an expression or pattern, creates an AST for the corresponding Coproduct constructor, which may itself be used as an expression or a pattern.
- build_
coprod_ type - Given a list of types, creates an AST for the corresponding Coproduct type.
- build_
coprod_ unreachable_ arm - Given the length of a Coproduct type, generates an “unreachable” match arm, matching the CNil case in order to work around limitations in the compiler’s exhaustiveness checking.
- build_
field_ expr - build_
field_ pat - build_
field_ type - build_
hlist_ constr - Given a list of expressions or patterns, creates an AST for the corresponding HList constructor, which may itself be used as an expression or a pattern.
- build_
hlist_ type - Given a list of types, creates an AST for the corresponding HList type.
- build_
label_ type - Given an Ident returns an AST for its type level representation based on the enums generated in frunk_core::labelled.
- build_
path_ type - call_
site_ ident - Returns an Ident
- find_
idents_ in_ expr - Returns the idents in a path like expression in reverse
- ref_
generics - to_ast
- Parses a TokenStream (usually received as input into a custom derive function), into a syn MacroInput AST, which is nice.