#[derive(Patchable)]
{
// Attributes available to this derive:
#[patchable]
}
Expand description
Derive macro that generates the companion Patch type and Patchable impl.
The generated patch type:
- mirrors the original struct shape (named/tuple/unit),
- includes fields unless marked with
#[patchable(skip)], - implements
CloneandPartialEq, - also derives
serde::Deserializewhen theserdefeature is enabled for the macro crate.
The Patchable impl sets type Patch = <StructName>Patch<...> and adds
any required generic bounds.
When the impl_from feature is enabled for the macro crate, a
From<Struct> implementation is also generated for the patch type.