pub trait PatchField {
// Required method
fn patch_field(
&mut self,
new: Self,
path: &StorePath,
notify: &mut dyn FnMut(&StorePath),
keys: Option<&KeyMap>,
);
}Expand description
Allows patching a store field with some new value.
Required Methods§
Sourcefn patch_field(
&mut self,
new: Self,
path: &StorePath,
notify: &mut dyn FnMut(&StorePath),
keys: Option<&KeyMap>,
)
fn patch_field( &mut self, new: Self, path: &StorePath, notify: &mut dyn FnMut(&StorePath), keys: Option<&KeyMap>, )
Patches the field with some new value, only notifying if the value has changed.
§Arguments
- new - new value
- path - path to the field
- notify - callback to notify about update
- keys - a reference to the KeyMap for the store that’s being patched
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".