#[derive(Cacheable)]
{
// Attributes available to this derive:
#[cacheable]
}
Expand description
Derive macro for sassi::Cacheable.
Generates:
- A companion
{StructName}Fieldsstruct with onesassi::Field<Self, FieldType>per declared field. impl sassi::Cacheable for {StructName}with:Id= the type of the field literally namedid.fields()trait method wiring every accessor to its real extractor (so genericT: Cacheablecallers can construct wired Fields without knowing the concrete type).
- When
#[cacheable(watermark_field = "...")]is present, animpl sassi::DeltaSyncCacheablewhoseWatermarkis the named field’s type and whosewatermark()clones that field.
Requirements:
- Input must be a struct with named fields.
- One of the fields must be literally named
id. id’s type must implementHash + Eq + Clone + Ord + Send + Sync + 'static.watermark_field, when present, must name a field whose type implementssassi::MonotonicWatermark.