Skip to main content

Recallable

Derive Macro Recallable 

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

Derive macro that generates the companion memento type and Recallable impl.

The generated memento type:

  • mirrors the original struct shape (named/tuple/unit),
  • includes fields unless marked with #[recallable(skip)],
  • also derives serde::Deserialize when the serde feature is enabled for the macro crate.

The Recallable impl sets type Memento = <StructName>Memento<...> 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 memento type.