[−][src]Struct goggles::local_world::World
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: 'static,
[src]
R: 'static,
pub fn remove_resource<R>(&mut self) -> Option<R> where
R: 'static,
[src]
R: 'static,
pub fn contains_resource<T>(&self) -> bool where
T: 'static,
[src]
T: 'static,
pub fn read_resource<R>(&self) -> ReadResource<'_, R> where
R: 'static,
[src]
R: '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: 'static,
[src]
R: '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<ComponentStorage<C>> where
C: Component + 'static,
C::Storage: Default,
[src]
C: Component + 'static,
C::Storage: Default,
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,
[src]
C: Component + 'static,
C::Storage: Default,
Remove storage for the given component.
pub fn contains_component<C>(&self) -> bool where
C: Component + 'static,
[src]
C: Component + 'static,
pub fn read_component<C>(&self) -> ReadComponent<'_, C> where
C: Component + 'static,
[src]
C: Component + 'static,
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,
[src]
C: Component + 'static,
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,
[src]
&mut self
) -> ComponentAccess<'_, C, &mut ComponentStorage<C>> where
C: Component + 'static,
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]
F: FetchResources<'a, Source = World, Resources = RwResources<WorldResourceId>>,
pub fn merge(&mut self)
[src]
Merge any pending 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> Any for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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>,