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§

source

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.

source

fn reset_modified_flag(&mut self)

Resets modified flag from the variable.

source

fn flags(&self) -> VariableFlags

Returns current variable flags.

source

fn set_flags(&mut self, flags: VariableFlags)

source

fn is_modified(&self) -> bool

Returns true if value was modified.

source

fn value_equals(&self, other: &dyn ReflectInheritableVariable) -> bool

Returns true if value equals to other’s value.

source

fn clone_value_box(&self) -> Box<dyn Reflect>

Clones self value.

source

fn mark_modified(&mut self)

Marks value as modified, so its value won’t be overwritten during property inheritance.

source

fn inner_value_mut(&mut self) -> &mut dyn Reflect

Returns a mutable reference to wrapped value without marking the variable itself as modified.

source

fn inner_value_ref(&self) -> &dyn Reflect

Returns a shared reference to wrapped value without marking the variable itself as modified.

Implementors§