Trait boa_engine::object::NativeObject
source · pub trait NativeObject: Any + Trace {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_mut_any(&mut self) -> &mut dyn Any;
}
Expand description
This trait allows Rust types to be passed around as objects.
This is automatically implemented when a type implements Any
and Trace
.
Required Methods§
sourcefn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Convert the Rust type which implements NativeObject
to a &dyn Any
.
sourcefn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Convert the Rust type which implements NativeObject
to a &mut dyn Any
.