Skip to main content

patchable_model

Attribute Macro patchable_model 

Source
#[patchable_model]
Expand description

Attribute macro that augments a struct with Patchable/Patch derives.

  • Always adds #[derive(Patchable, Patch)].
  • When the serde feature is enabled for the macro crate, it also adds #[derive(serde::Serialize)].
  • For fields annotated with #[patchable(skip)], it injects #[serde(skip)] to keep serde output aligned with patching behavior.

This macro preserves the original struct shape and only mutates attributes.