Expand description
Commonly-implemented functionality for Trustfall vertex types.
Trustfall vertex types are nearly always enums. Here’s the easiest way to make a Trustfall vertex:
#[derive(Debug, Clone, TrustfallEnumVertex)]
enum Vertex {
// variants that match the type in your schema;
// for example:
User(Rc<User>),
Message(Rc<Message>),
}Derive Macros§
- Trustfall
Enum Vertex - Adds the
Typenametrait andas_<variant>()methods on an enum used as a Trustfall vertex. - Typename
- Derives the
Typenametrait on the enum being used as a Trustfall vertex.