Skip to main content

recallable_model

Attribute Macro recallable_model 

Source
#[recallable_model]
Expand description

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

  • Always adds #[derive(Recallable, Recall)].
  • When the serde feature is enabled for the macro crate, it also adds #[derive(serde::Serialize)].
  • For fields annotated with #[recallable(skip)], it injects #[serde(skip)] to keep serde output aligned with recall behavior.
  • This attribute itself takes no arguments.

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

Attribute ordering: This macro must appear before any attributes it needs to inspect. An attribute macro only receives attributes that follow it in source order. For example, #[derive(Serialize)] placed above #[recallable_model] is invisible to the macro and will cause a duplicate-derive error.