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§
Sourcefn get_at_keypath<'a, V>(
&'a self,
keypath: &'a KeyPaths<Self, V>,
) -> KeyPathResult<&'a V>
fn get_at_keypath<'a, V>( &'a self, keypath: &'a KeyPaths<Self, V>, ) -> KeyPathResult<&'a V>
Get a value at a keypath
Sourcefn set_at_keypath<V>(
&mut self,
_keypath: KeyPaths<Self, V>,
_value: V,
) -> KeyPathResult<()>
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.