pub trait ReflectInheritableVariable: Reflect + Debug {
// Required methods
fn try_inherit(
&mut self,
parent: &dyn ReflectInheritableVariable,
ignored_types: &[TypeId]
) -> Result<Option<Box<dyn Reflect>>, InheritError>;
fn reset_modified_flag(&mut self);
fn flags(&self) -> VariableFlags;
fn set_flags(&mut self, flags: VariableFlags);
fn is_modified(&self) -> bool;
fn value_equals(&self, other: &dyn ReflectInheritableVariable) -> bool;
fn clone_value_box(&self) -> Box<dyn Reflect>;
fn mark_modified(&mut self);
fn inner_value_mut(&mut self) -> &mut dyn Reflect;
fn inner_value_ref(&self) -> &dyn Reflect;
}
Required Methods§
sourcefn try_inherit(
&mut self,
parent: &dyn ReflectInheritableVariable,
ignored_types: &[TypeId]
) -> Result<Option<Box<dyn Reflect>>, InheritError>
fn try_inherit( &mut self, parent: &dyn ReflectInheritableVariable, ignored_types: &[TypeId] ) -> Result<Option<Box<dyn Reflect>>, InheritError>
Tries to inherit a value from parent. It will succeed only if the current variable is not marked as modified.
sourcefn reset_modified_flag(&mut self)
fn reset_modified_flag(&mut self)
Resets modified flag from the variable.
sourcefn flags(&self) -> VariableFlags
fn flags(&self) -> VariableFlags
Returns current variable flags.
fn set_flags(&mut self, flags: VariableFlags)
sourcefn is_modified(&self) -> bool
fn is_modified(&self) -> bool
Returns true if value was modified.
sourcefn value_equals(&self, other: &dyn ReflectInheritableVariable) -> bool
fn value_equals(&self, other: &dyn ReflectInheritableVariable) -> bool
Returns true if value equals to other’s value.
sourcefn clone_value_box(&self) -> Box<dyn Reflect>
fn clone_value_box(&self) -> Box<dyn Reflect>
Clones self value.
sourcefn mark_modified(&mut self)
fn mark_modified(&mut self)
Marks value as modified, so its value won’t be overwritten during property inheritance.
sourcefn inner_value_mut(&mut self) -> &mut dyn Reflect
fn inner_value_mut(&mut self) -> &mut dyn Reflect
Returns a mutable reference to wrapped value without marking the variable itself as modified.
sourcefn inner_value_ref(&self) -> &dyn Reflect
fn inner_value_ref(&self) -> &dyn Reflect
Returns a shared reference to wrapped value without marking the variable itself as modified.