Skip to content

Rust: Allow specifying of Custom use in header and #[derives] on Structs #30

@AdamLeyshon

Description

@AdamLeyshon

This would enable people to use the generated Structs with other libraries such as Diesel that require us to use #[derive] macros on Structs that have complicated trait implementations and others such as Default

Example:

#[derive(FromSqlRow, AsExpression, Serialize, Deserialize, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct ApiConfigData {
    #[serde(rename = "inventory")]
    inventory: Inventory,

    #[serde(rename = "maintenance")]
    maintenance: Maintenance,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions