Skip to main content

Crate recallable_macro

Crate recallable_macro 

Source
Expand description

§Recallable Macro

Procedural macros backing the recallable crate.

Provided macros:

  • #[recallable_model]: injects Recallable/Recall derives; with the serde Cargo feature enabled for this macro crate it also adds serde::Serialize and applies #[serde(skip)] to fields marked #[recallable(skip)].

  • #[derive(Recallable)]: generates an internal companion memento struct, exposes it as <Struct as Recallable>::Memento, and emits the Recallable impl; with the impl_from Cargo feature it also generates From<Struct> for the memento type.

  • #[derive(Recall)]: generates the Recall implementation and recursively recalls fields annotated with #[recallable].

Feature flags are evaluated in the recallable-macro crate itself. See context for details about the generated memento struct and trait implementations.

Attribute Macros§

recallable_model
Attribute macro that augments a struct with Recallable/Recall derives.

Derive Macros§

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