Skip to main content

Readable

Trait Readable 

Source
pub trait Readable<Root, Value> {
    // Required method
    fn get(&self, root: Root) -> Option<Value>;
}
Expand description

Read-only keypath: navigate from Root to Value.

Required Methods§

Source

fn get(&self, root: Root) -> Option<Value>

Getter path. Returns None when navigation fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<R, Lock, Mid, V, Root, LockValue, MidValue, Value, MutRoot, MutLock, MutMid, MutValue, G1, S1, L, G2, S2> Readable<Root, Value> 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§

fn get(&self, root: Root) -> Option<Value>

Source§

impl<R, V, V2, Root, Value, Value2, MutRoot, MutValue, MutValue2, First, Second> Readable<Root, Value2> 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>,

Source§

fn get(&self, root: Root) -> Option<Value2>

Implementors§

Source§

impl<R, V, Root, Value, MutRoot, MutValue, G, S> Readable<Root, Value> 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>,