Struct ambient_ui::prelude::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>(
&self,
entity_id: EntityId,
component: Component<T>,
value: T
) -> Result<(), ECSError>where
T: SupportedValue,
pub fn add_component<T>(
&self,
entity_id: EntityId,
component: Component<T>,
value: T
) -> Result<(), ECSError>where
T: SupportedValue,
pub fn add_components( &self, entity_id: EntityId, components: Entity ) -> Result<(), ECSError>
pub fn get<T>(
&self,
entity_id: EntityId,
component: Component<T>
) -> Result<T, ECSError>where
T: SupportedValue,
pub fn get_cloned<T>(
&self,
entity_id: EntityId,
component: Component<T>
) -> Result<T, ECSError>where
T: SupportedValue,
pub fn has_component<T>(
&self,
entity_id: EntityId,
component: Component<T>
) -> boolwhere
T: SupportedValue,
pub fn resource<T>(&self, component: Component<T>) -> Twhere
T: SupportedValue,
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
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.