Skip to main content

Module kptrait

Module kptrait 

Source
Expand description

Keypath traits: read/write surfaces, chaining, coercion, and higher-order helpers.

KpTrait composes Readable (getter path) and Writable (setter path, exposed as Writable::set) plus KpTrait::then.

Traitsยง

AccessorTrait
ChainExt
CoercionTrait
HofTrait
KeyPathValueTarget
Used so that then_async can infer V2 from AsyncKp::Value without ambiguity (e.g. &i32 has both Borrow<i32> and Borrow<&i32>; this picks the referent). Implemented only for reference types so there is no overlap with the blanket impl.
KpTrait
Readable
Read-only keypath surface: navigate from Root to Value (logical value type V).
Writable
Mutable keypath surface: setter path (same closure as Kp::get_mut).