Crate butane_codegen
source ·Macros
Attribute Macros
- Attribute macro which marks a type as being available to butane for use in models.
- Attribute macro which generates an implementation of
DataResult
. Continuing with our blog post example from model, we could create aDataResult
with only some of the fields fromPost
(to avoid fetching all of them in a query). - 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