pub trait ReflectInheritableVariable: Reflect + Debug {
// Required methods
fn try_inherit(
&mut self,
parent: &(dyn ReflectInheritableVariable + 'static),
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 + 'static),
) -> bool;
fn clone_value_box(&self) -> Box<dyn Reflect>;
fn mark_modified(&mut self);
fn inner_value_mut(&mut self) -> &mut (dyn Reflect + 'static);
fn inner_value_ref(&self) -> &(dyn Reflect + 'static);
}
Required Methods§
Sourcefn try_inherit(
&mut self,
parent: &(dyn ReflectInheritableVariable + 'static),
ignored_types: &[TypeId],
) -> Result<Option<Box<dyn Reflect>>, InheritError>
fn try_inherit( &mut self, parent: &(dyn ReflectInheritableVariable + 'static), 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 + 'static),
) -> bool
fn value_equals( &self, other: &(dyn ReflectInheritableVariable + 'static), ) -> 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 + 'static)
fn inner_value_mut(&mut self) -> &mut (dyn Reflect + 'static)
Returns a mutable reference to wrapped value without marking the variable itself as modified.
Sourcefn inner_value_ref(&self) -> &(dyn Reflect + 'static)
fn inner_value_ref(&self) -> &(dyn Reflect + 'static)
Returns a shared reference to wrapped value without marking the variable itself as modified.