Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AdamLeyshon opened this issue Jul 12, 2021 · 0 comments

Comments

@AdamLeyshon
Copy link

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,
}
@AdamLeyshon AdamLeyshon changed the title Rust: Allow specifying of Custom uses and Derives Rust: Allow specifying of Custom use in header and #[derives] on Structs Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant