dsync
dsync copied to clipboard
feat: custom derive as config
Maybe sometimes custom derives would be needed, IMHO.
#[derive(Debug, Clone)]
pub struct TableOptions<'a> {
// ... other fields are omitted for brevity.
/// any arbitrary derives to append
extra_derives: Vec<&'a str>
}
How about this? Thanks.
i dont think such a field would be a good idea, but maybe a callback function that runs custom code to extend the list? that way no multiple fields are necessary for each struct type and extra conditions can be added.
also i dont think it is currently possible with a callback function, until #87 is merged which refactored the generation to use a vector instead of static format!("{derive1}{derive2}")