ToSql

Derive Macro ToSql 

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

The purpose of this derive macro is to implement the rusqlite::ToSql trait for enums (with unit variants only) and newtype wrapper structs. Multi-field structs can use the #[nanosql(ignore)] attribute on all except one field, in order to delegate the impl to that one field.

When derived on an enum, the rename_all (type-level) and rename (variant-level) attributes work in the same manner as those of Table. See the documentation of Table for details.