Skip to content

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

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,
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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