Skip to main content

Crate prismqueer_projections

Crate prismqueer_projections 

Source
Expand description

Derive macros for prism-core.

#[derive(Prism)] with #[oid("@something")] generates:

  • Addressable impl (Oid from the @name string, deterministic)
  • Display impl (prints the @name)

Field-level optic annotations generate accessor structs:

  • #[lens] — total, bidirectional. Generates FieldNameLens with view/set.
  • #[prism] — partial access. Generates FieldNamePrism with extract/review.
  • #[traversal] — multiple targets. Generates FieldNameTraversal with traverse/traverse_mut.
  • #[iso] — round-trip lossless. Generates FieldNameIso with forward/backward.

Also generates optic_fields() returning &'static [FieldOptic] metadata.

Macros§

declaration
declaration!{} — the @code/rust/macro reception entry point.

Derive Macros§

Lambda
Derive Composable, LambdaImpl, Addressable, and Display for a named lambda.
Prism
Derive Addressable, Display, optic accessors, and optic_fields().