Skip to main content

Module model

Module model 

Source

Structs§

Join

Traits§

FromRow
A record that can be built from a row returned by the database.
HasModelBuilder
Insertable
A struct that is Insertable is expected to have same fields as the model, excluding fields that have sane defaults at the database level. Concretely, if you have a Person struct: #[derive(ormlitex::Model)] struct Person { id: i32, name: String, age: i32, }
IntoArguments
JoinMeta
Loadable
Model
The core trait. a struct that implements Model can also implement HasModelBuilder, (and is required to implement Insertable)
ModelBuilder
A struct that implements ModelBuilder implements the builder pattern for a model.
TableMeta

Derive Macros§

FromRow
IntoArguments
Model
Derive macro for #[derive(Model)] It additionally generates FromRow for the struct, since Model requires FromRow.
TableMeta