keyed_lens 0.1.0
keyed_lens: ^0.1.0 copied to clipboard
Composable total and affine lenses for immutable aggregates, each carrying a stable, serializable FieldKey identity that addresses a field for reads, writes, diffs and patches.
0.1.0 #
Initial release.
FieldKey+ sealedSegment(NameSegment/IdSegment) — stable, serializable field identity with a frozentoPath()/parse()wire codec.hashCodeis cached (a key is immutable and used as aMap/Setkey on every validation, touch check and error lookup);==early-outs on a hash mismatch.Lens(total) /AffineLens(affine) withthen/thenTotalcomposition; affineset/updateno-op on a non-resolving path.ListItemLens+.at(id, matches)— by-id list-row access.Prism— minimal type-narrowing optic for sum types.whenPresent(),Opt(Some/None),KeyedRow.