Skip to main content

Writable

Trait Writable 

Source
pub trait Writable<MutRoot, MutValue> {
    // Required method
    fn set(&self, root: MutRoot) -> Option<MutValue>;
}
Expand description

Mutable keypath: setter path (same semantics as a get_mut closure on many keypath APIs).

Required Methods§

Source

fn set(&self, root: MutRoot) -> Option<MutValue>

Setter path. Returns None when navigation fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R, Lock, Mid, V, Root, LockValue, MidValue, Value, MutRoot, MutLock, MutMid, MutValue, G1, S1, L, G2, S2> Writable<MutRoot, MutValue> for SyncKp<R, Lock, Mid, V, Root, LockValue, MidValue, Value, MutRoot, MutLock, MutMid, MutValue, G1, S1, L, G2, S2>
where Root: Borrow<R>, LockValue: Borrow<Lock>, MidValue: Borrow<Mid>, Value: Borrow<V>, MutRoot: BorrowMut<R>, MutLock: BorrowMut<Lock>, MutMid: BorrowMut<Mid>, MutValue: BorrowMut<V>, G1: Fn(Root) -> Option<LockValue>, S1: Fn(MutRoot) -> Option<MutLock>, L: LockAccess<Lock, MidValue> + LockAccess<Lock, MutMid>, G2: Fn(MidValue) -> Option<Value>, S2: Fn(MutMid) -> Option<MutValue>,

Source§

impl<R, V, Root, Value, MutRoot, MutValue, G, S> Writable<MutRoot, MutValue> for Kp<R, V, Root, Value, MutRoot, MutValue, G, S>
where Root: Borrow<R>, Value: Borrow<V>, MutRoot: BorrowMut<R>, MutValue: BorrowMut<V>, G: Fn(Root) -> Option<Value>, S: Fn(MutRoot) -> Option<MutValue>,

Source§

impl<R, V, V2, Root, Value, Value2, MutRoot, MutValue, MutValue2, First, Second> Writable<MutRoot, MutValue2> for KpThenSyncKp<R, V, V2, Root, Value, Value2, MutRoot, MutValue, MutValue2, First, Second>
where First: SyncKeyPathLike<Root, Value, MutRoot, MutValue>, Second: SyncKeyPathLike<Value, Value2, MutValue, MutValue2>,