KeyPathsOperable

Trait KeyPathsOperable 

Source
pub trait KeyPathsOperable: Sized {
    // Provided methods
    fn get_at_keypath<'a, V>(
        &'a self,
        keypath: &'a KeyPaths<Self, V>,
    ) -> KeyPathResult<&'a V> { ... }
    fn set_at_keypath<V>(
        &mut self,
        _keypath: KeyPaths<Self, V>,
        _value: V,
    ) -> KeyPathResult<()> { ... }
}
Expand description

Trait for types that can be operated on with keypaths

Provided Methods§

Source

fn get_at_keypath<'a, V>( &'a self, keypath: &'a KeyPaths<Self, V>, ) -> KeyPathResult<&'a V>

Get a value at a keypath

Source

fn set_at_keypath<V>( &mut self, _keypath: KeyPaths<Self, V>, _value: V, ) -> KeyPathResult<()>

Set a value at a keypath (if the keypath supports mutation)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§