Crate butane_codegen

Source
Expand description

Macros for butane

Macros§

filter
Macro to construct a BoolExpr (for use with a Query) from an expression with Rust syntax.

Attribute Macros§

butane_type
Attribute macro which marks a type as being available to butane for use in models.
dataresult
Attribute macro which generates an implementation of DataResult. Continuing with our blog post example from model, we could create a DataResult with only some of the fields from Post (to avoid fetching all of them in a query).
model
Attribute macro which marks a struct as being a data model and generates an implementation of DataObject. This macro will also write information to disk at compile time necessary to generate migrations

Derive Macros§

FieldType
Derive macro for FieldType. Produces a String field for simple enums, otherwise uses a JSON field if json feature is enabled. E.g.
PrimaryKeyType
Derive macro for marker trait PrimaryKeyType. E.g.