Skip to main content

Patch

Derive Macro Patch 

Source
#[derive(Patch)]
{
    // Attributes available to this derive:
    #[patchable]
}
Expand description

Derive macro that generates the Patch trait implementation.

The generated patch method:

  • assigns fields directly by default,
  • recursively calls patch on fields marked with #[patchable],
  • respects #[patchable(skip)] by omitting those fields from patching.