Skip to content

feat: struct level #[difference(recurse)]Β #42

@carlocorradini

Description

@carlocorradini

Allow #[difference(recurse)] to be used at the struct level.
The latter allows to recursively apply recurse to all struct fields without having to provide #[difference(recurse)] for each one.
Furthermore, if a field should skip the struct level recurse (i.e., an unit enum), allow #[difference(recurse(skip))].

#[derive(Difference, Debug, Clone)]
#[difference(recurse)]
pub struct Entity {
    pub id: String,
    #[difference(recurse(skip))]
    pub status: MyEnum,
    pub location: MyStruct,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions