Expand description
optics: yet another Haskell optics in Rust.
Modules§
- Concrete implementations for optics.
- Prelude, aimed for blanket import.
- Traits for polymorphic lens hierarchy.
Macros§
- Declare an
AffineTraversalfrom an accessor expression. - Declare a
Lensfrom an accessor expression. - Declare a
Lensfrom a field name for astruct. - Declare a
Prismfrom a variant name for anenum. - Similar to
declare_affine_traversal, but does not define the lens type for you. - Similar to
declare_lens, but does not define the lens type for you. Normallymark_infallibleshould be used together with this macro. - Implement the lens hierarchy from some specific level.
- Mark an optics as fallible by implementing
OpticsFallible. - Mark an optics as infallible by implementing
OpticsFallible. - Mark an optics to have a single known source type by implementing
OpticsKnownSource. - Easy composition for optics. See also
Compose.