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
AffineTraversal
from an accessor expression. - Declare a
Lens
from an accessor expression. - Declare a
Lens
from a field name for astruct
. - Declare a
Prism
from 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_infallible
should 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
.