Skip to main content

Aggregate

Derive Macro Aggregate 

Source
#[derive(Aggregate)]
{
    // Attributes available to this derive:
    #[sofie]
    #[owner]
    #[aggregate]
    #[min]
    #[max]
    #[length]
    #[range]
    #[required]
    #[unique]
    #[expose]
    #[mirror]
    #[sensitive]
}
Expand description

#[owner] marks the Id<…> field naming the owner; on the struct, a record that is its own owner, or with (through = parent) one owned by its parent’s owner. #[aggregate(behaviors(Slugged(from = name)))] adds behaviors to Versioned and Timestamps. Field constraints are those of #[derive(Input)]. A #[sensitive] field shows as *** in Debug and logs; it and one of a sensitive type stay out of JSON and search.