[][src]Struct goggles::world::World

pub struct World { /* fields omitted */ }

Implementations

impl World[src]

pub fn new() -> Self[src]

pub fn entities(&self) -> Entities<'_>[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]

pub fn remove_resource<R>(&mut self) -> Option<R> where
    R: Send + 'static, 
[src]

pub fn contains_resource<T>(&self) -> bool where
    T: Send + 'static, 
[src]

pub fn read_resource<R>(&self) -> ReadResource<'_, R> where
    R: Send + Sync + 'static, 
[src]

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]

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: Send + 'static, 
[src]

Panics

Panics if the resource has not been inserted.

pub fn insert_component<C>(&mut self) -> Option<ComponentStorage<C>> where
    C: Component + 'static,
    C::Storage: Default + Send
[src]

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<ComponentStorage<C>> where
    C: Component + 'static,
    C::Storage: Default + Send
[src]

Remove storage for the given component.

pub fn contains_component<C>(&self) -> bool where
    C: Component + 'static,
    C::Storage: Send
[src]

pub fn read_component<C>(&self) -> ReadComponent<'_, C> where
    C: Component + 'static,
    C::Storage: Send + Sync
[src]

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]

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 ComponentStorage<C>> where
    C: Component + 'static,
    C::Storage: Send
[src]

Panics

Panics if the component has not been inserted.

pub fn fetch<'a, F>(&'a self) -> F where
    F: FetchResources<'a, Source = World, Resources = RwResources<WorldResourceId>>, 
[src]

pub fn merge(&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

impl Default for World[src]

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]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.