Skip to main content

TableStruct

Derive Macro TableStruct 

Source
#[derive(TableStruct)]
{
    // Attributes available to this derive:
    #[table]
}
Expand description

Derive the necessary traits for Table structs

This must be used on a struct with named fields (for now). This must be used on a struct which has type parameters in the form: <'scope, Mode: [TableMode], ...>

This derive macro has the following attributes:

  • #[table(proxy)]: Used on any type parameter coming after Mode, this tells us to wire them up. (This will be improved in the future)

  • #[table(nested)]: Used on a field which has the type OtherTable<'scope, Mode>, instructs the derive macro to treat this field as nested.