Trait maomi::prop::PropertyUpdate
source · pub trait PropertyUpdate<S: ?Sized> {
type UpdateContext;
// Required method
fn compare_and_set_ref(
dest: &mut Self,
src: &S,
ctx: &mut Self::UpdateContext
);
}
Expand description
The property updater.
This trait is implemented by Prop
.
Custom property types that implements this trait can also be set through templates.
Required Associated Types§
sourcetype UpdateContext
type UpdateContext
Must be bool
if used in components and updated through templates.
Required Methods§
sourcefn compare_and_set_ref(dest: &mut Self, src: &S, ctx: &mut Self::UpdateContext)
fn compare_and_set_ref(dest: &mut Self, src: &S, ctx: &mut Self::UpdateContext)
The updater.
If used in components and updated through templates,
ctx
must be set to true if updated.