Skip to main content

ReflectInheritableVariable

Trait ReflectInheritableVariable 

Source
pub trait ReflectInheritableVariable: Reflect {
    // 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§

Source

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.

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 + 'static), ) -> 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 + 'static)

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

Source

fn inner_value_ref(&self) -> &(dyn Reflect + 'static)

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§