Skip to main content

EntityEventSource

Trait EntityEventSource 

Source
pub trait EntityEventSource {
    // Required methods
    fn as_entity_event_source(&self) -> &dyn Entity;
    fn into_shared_entity(self: Arc<Self>) -> SharedEntity;
}
Expand description

Object-safe access to an entity trait object from default Entity methods.

Required Methods§

Source

fn as_entity_event_source(&self) -> &dyn Entity

Returns this entity as a game-event source.

Source

fn into_shared_entity(self: Arc<Self>) -> SharedEntity

Retains this exact entity allocation as a shared entity handle.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§