pub trait GameObject:
GameObjectBoxClone
+ Scriptable
+ Drawable
+ Parent
+ Child
+ Any
+ 'static
+ Send
+ Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn cast_camera_arc_rwlock(
&self,
this: Arc<RwLock<dyn GameObject>>,
) -> Result<Arc<RwLock<dyn Camera>>, ()>;
fn cast_light_arc_rwlock(
&self,
this: Arc<RwLock<dyn GameObject>>,
) -> Result<Arc<RwLock<dyn Light>>, ()>;
fn get_id(&self) -> ID;
fn get_subspace(&self) -> Space;
fn get_inversed_subspace(&self) -> Space;
}Required Methods§
fn as_any(&self) -> &dyn Any
fn cast_camera_arc_rwlock( &self, this: Arc<RwLock<dyn GameObject>>, ) -> Result<Arc<RwLock<dyn Camera>>, ()>
fn cast_light_arc_rwlock( &self, this: Arc<RwLock<dyn GameObject>>, ) -> Result<Arc<RwLock<dyn Light>>, ()>
fn get_id(&self) -> ID
fn get_subspace(&self) -> Space
fn get_inversed_subspace(&self) -> Space
Trait Implementations§
Source§impl Clone for Box<dyn GameObject>
impl Clone for Box<dyn GameObject>
Source§impl Debug for dyn GameObject
impl Debug for dyn GameObject
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".