[−][src]Struct goggles::world::World
Methods
impl World
[src]
pub fn new() -> Self
[src]
pub fn entities(&self) -> Entities
[src]
pub fn create_entity_atomic(&self) -> Entity
[src]
pub fn create_entity(&mut self) -> Entity
[src]
pub fn delete_entity(&mut self, e: Entity) -> Result<(), WrongGeneration>
[src]
pub fn insert_resource<R>(&mut self, r: R) -> Option<R> where
R: Send + 'static,
[src]
R: Send + 'static,
pub fn remove_resource<R>(&mut self) -> Option<R> where
R: Send + 'static,
[src]
R: Send + 'static,
pub fn contains_resource<T>(&self) -> bool where
T: Send + 'static,
[src]
T: Send + 'static,
pub fn read_resource<R>(&self) -> ReadResource<R> where
R: Send + Sync + 'static,
[src]
R: Send + Sync + 'static,
Borrow the given resource immutably.
Panics
Panics if the resource has not been inserted or is already borrowed mutably.
pub fn write_resource<R>(&self) -> WriteResource<R> where
R: Send + 'static,
[src]
R: Send + 'static,
Borrow the given resource mutably.
Panics
Panics if the resource has not been inserted or is already borrowed.
pub fn get_resource_mut<R>(&mut self) -> &mut R where
R: 'static,
[src]
R: 'static,
Panics
Panics if the resource has not been inserted.
pub fn insert_component<C>(&mut self) -> Option<MaskedStorage<C>> where
C: Component + 'static,
C::Storage: Default + Send,
[src]
C: Component + 'static,
C::Storage: Default + Send,
Insert a new, fresh storage for the given component.
If the component was already inserted, this will clear the storage for the component first.
pub fn remove_component<C>(&mut self) -> Option<MaskedStorage<C>> where
C: Component + 'static,
C::Storage: Default + Send,
[src]
C: Component + 'static,
C::Storage: Default + Send,
Remove storage for the given component.
pub fn contains_component<C>(&self) -> bool where
C: Component + 'static,
C::Storage: Send,
[src]
C: Component + 'static,
C::Storage: Send,
pub fn read_component<C>(&self) -> ReadComponent<C> where
C: Component + 'static,
C::Storage: Send + Sync,
[src]
C: Component + 'static,
C::Storage: Send + Sync,
Borrow the given component immutably.
Panics
Panics if the component has not been inserted or is already borrowed mutably.
pub fn write_component<C>(&self) -> WriteComponent<C> where
C: Component + 'static,
C::Storage: Send,
[src]
C: Component + 'static,
C::Storage: Send,
Borrow the given component mutably.
Panics
Panics if the component has not been inserted or is already borrowed.
pub fn get_component_mut<C>(
&mut self
) -> ComponentAccess<C, &mut MaskedStorage<C>> where
C: Component + 'static,
[src]
&mut self
) -> ComponentAccess<C, &mut MaskedStorage<C>> where
C: Component + 'static,
Panics
Panics if the component has not been inserted.
pub fn fetch<'a, S>(&'a self) -> S where
S: SystemData<'a, Source = World, Resources = RwResources<WorldResourceId>>,
[src]
S: SystemData<'a, Source = World, Resources = RwResources<WorldResourceId>>,
pub fn merge_atomic(&mut self)
[src]
Merge any pending atomic entity operations.
Merges atomically allocated entities into the normal entity BitSet
for performance, and
finalizes any entities that were requested to be deleted.
No entity is actually removed until this method is called.
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,