Skip to main content

DeriveIntoActiveModel

Derive Macro DeriveIntoActiveModel 

Source
#[derive(DeriveIntoActiveModel)]
{
    // Attributes available to this derive:
    #[turso]
}
Available on crate feature macros only.
Expand description

Derives IntoActiveModel for a plain struct whose fields are a subset of an entity’s columns.

Struct attribute: #[turso(active_model = "path::ActiveModel")], the ActiveModel in scope by default. Field attribute: #[turso(ignore)]. A plain field becomes Set; an Option around the attribute type becomes Set when Some and NotSet when None.