Struct ambient_guest_bridge::ecs::World
source · pub struct World;
Implementations§
source§impl World
impl World
pub fn spawn(&self, entity: Entity) -> EntityId
pub fn despawn(&self, entity_id: EntityId) -> Option<Entity>
pub fn exists(&self, entity_id: EntityId) -> bool
pub fn set<T: ComponentValue>( &self, entity_id: EntityId, component: Component<T>, value: T ) -> Result<(), ECSError>
pub fn add_component<T: ComponentValue>( &self, entity_id: EntityId, component: Component<T>, value: T ) -> Result<(), ECSError>
pub fn add_components( &self, entity_id: EntityId, components: Entity ) -> Result<(), ECSError>
pub fn get<T: ComponentValue>( &self, entity_id: EntityId, component: Component<T> ) -> Result<T, ECSError>
pub fn get_cloned<T: ComponentValue>( &self, entity_id: EntityId, component: Component<T> ) -> Result<T, ECSError>
pub fn has_component<T: ComponentValue>( &self, entity_id: EntityId, component: Component<T> ) -> bool
pub fn resource<T: ComponentValue>(&self, component: Component<T>) -> T
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnwindSafe for World
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more