Expand description
Derive macros for prism-core.
#[derive(Prism)] with #[oid("@something")] generates:
Addressableimpl (Oid from the@namestring, deterministic)Displayimpl (prints the@name)
Field-level optic annotations generate accessor structs:
#[lens]— total, bidirectional. GeneratesFieldNameLenswithview/set.#[prism]— partial access. GeneratesFieldNamePrismwithextract/review.#[traversal]— multiple targets. GeneratesFieldNameTraversalwithtraverse/traverse_mut.#[iso]— round-trip lossless. GeneratesFieldNameIsowithforward/backward.
Also generates optic_fields() returning &'static [FieldOptic] metadata.
Macros§
- declaration
declaration!{}— the @code/rust/macro reception entry point.