Expand description
Lightweight, dependency-free keypath traits for Rust.
Implement Readable and Writable on your keypath types so callers can navigate
roots uniformly. Use KpTrait for TypeId helpers and KpTrait::then composition.
Higher-level crates (for example rust-key-paths) add concrete keypath structs,
chaining, and lock/async adapters on top of these traits.
Traitsยง
- Accessor
Trait - Optional-root and fallback helpers built on
Readable/Writable. - KeyPath
- A keypath that supports both read and write navigation.
- KeyPath
Value Target - Used so async chaining can infer the referent of a reference-valued step
(e.g.
&Tand&mut Tboth map toT). - KpTrait
- Logical root/value type identity and composition for a keypath.
- Readable
- Read-only keypath: navigate from
RoottoValue. - Writable
- Mutable keypath: setter path (same semantics as a
get_mutclosure on many keypath APIs).