Systems

Struct Systems 

Source
pub struct Systems { /* private fields */ }

Implementations§

Source§

impl Systems

Source

pub fn add( &mut self, system: impl System, locals: impl Bundle, ) -> Result<Entity, Box<dyn Error>>

Source

pub fn add_locals( &mut self, entity: Entity, bundle: impl Bundle, ) -> Result<(), Box<dyn Error>>

Source

pub fn run<const LOCKING: bool>( &self, universe: &Universe, entity: Entity, ) -> Result<(), Box<dyn Error>>

Source

pub fn try_run<const LOCKING: bool>( &self, universe: &Universe, entity: Entity, ) -> Result<(), Box<dyn Error>>

Source

pub fn run_one_shot<const LOCKING: bool>( universe: &Universe, system: impl System, ) -> Result<(), Box<dyn Error>>

Source

pub fn try_run_one_shot<const LOCKING: bool>( universe: &Universe, system: impl System, ) -> Result<(), Box<dyn Error>>

Methods from Deref<Target = World>§

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn entities(&self) -> impl Iterator<Item = Entity> + '_

Source

pub fn archetypes(&self) -> impl Iterator<Item = &Archetype>

Source

pub fn archetypes_mut(&mut self) -> impl Iterator<Item = &mut Archetype>

Source

pub fn added(&self) -> &WorldChanges

Source

pub fn removed(&self) -> &WorldChanges

Source

pub fn updated(&self) -> Option<RwLockReadGuard<'_, WorldChanges>>

Source

pub fn entity_did_changed(&self, entity: Entity) -> bool

Source

pub fn component_did_changed<T>(&self) -> bool

Source

pub fn component_did_changed_raw(&self, type_hash: TypeHash) -> bool

Source

pub fn entity_component_did_changed<T>(&self, entity: Entity) -> bool

Source

pub fn entity_component_did_changed_raw( &self, entity: Entity, type_hash: TypeHash, ) -> bool

Source

pub fn update<T>(&self, entity: Entity)

Source

pub fn update_raw(&self, entity: Entity, type_hash: TypeHash)

Source

pub fn clear_changes(&mut self)

Source

pub fn clear(&mut self)

Source

pub fn spawn(&mut self, bundle: impl Bundle) -> Result<Entity, WorldError>

Source

pub unsafe fn spawn_uninitialized<T: BundleColumns>( &mut self, ) -> Result<(Entity, ArchetypeEntityRowAccess<'_>), WorldError>

§Safety
Source

pub unsafe fn spawn_uninitialized_raw( &mut self, columns: Vec<ArchetypeColumnInfo>, ) -> Result<(Entity, ArchetypeEntityRowAccess<'_>), WorldError>

§Safety
Source

pub fn despawn(&mut self, entity: Entity) -> Result<(), WorldError>

Source

pub unsafe fn despawn_uninitialized( &mut self, entity: Entity, ) -> Result<(), WorldError>

§Safety
Source

pub fn insert( &mut self, entity: Entity, bundle: impl Bundle, ) -> Result<(), WorldError>

Source

pub fn remove<T: BundleColumns>( &mut self, entity: Entity, ) -> Result<(), WorldError>

Source

pub fn remove_raw( &mut self, entity: Entity, columns: Vec<ArchetypeColumnInfo>, ) -> Result<(), WorldError>

Source

pub fn merge<const LOCKING: bool>( &mut self, other: Self, processor: &WorldProcessor, ) -> Result<(), WorldError>

Source

pub fn has_entity(&self, entity: Entity) -> bool

Source

pub fn has_entity_component<T: Component>(&self, entity: Entity) -> bool

Source

pub fn has_entity_component_raw( &self, entity: Entity, component: TypeHash, ) -> bool

Source

pub fn find_by<const LOCKING: bool, T: Component + PartialEq>( &self, data: &T, ) -> Option<Entity>

Source

pub fn component<const LOCKING: bool, T: Component>( &self, entity: Entity, ) -> Result<ComponentRef<'_, LOCKING, T>, WorldError>

Source

pub fn component_mut<const LOCKING: bool, T: Component>( &self, entity: Entity, ) -> Result<ComponentRefMut<'_, LOCKING, T>, WorldError>

Source

pub fn get<const LOCKING: bool, T: Component>( &self, entity: Entity, unique: bool, ) -> Result<ArchetypeEntityColumnAccess<'_, LOCKING, T>, WorldError>

Source

pub fn dynamic_get<const LOCKING: bool>( &self, type_hash: TypeHash, entity: Entity, unique: bool, ) -> Result<ArchetypeDynamicEntityColumnAccess<'_, LOCKING>, WorldError>

Source

pub fn row<const LOCKING: bool>( &self, entity: Entity, ) -> Result<ArchetypeEntityRowAccess<'_>, WorldError>

Source

pub fn query<'a, const LOCKING: bool, Fetch: TypedQueryFetch<'a, LOCKING>>( &'a self, ) -> TypedQueryIter<'a, LOCKING, Fetch>

Source

pub fn dynamic_query<'a, const LOCKING: bool>( &'a self, filter: &DynamicQueryFilter, ) -> DynamicQueryIter<'a, LOCKING>

Source

pub fn lookup<'a, const LOCKING: bool, Fetch: TypedLookupFetch<'a, LOCKING>>( &'a self, entities: impl IntoIterator<Item = Entity> + 'a, ) -> TypedLookupIter<'a, LOCKING, Fetch>

Source

pub fn lookup_access<'a, const LOCKING: bool, Fetch: TypedLookupFetch<'a, LOCKING>>( &'a self, ) -> TypedLookupAccess<'a, LOCKING, Fetch>

Source

pub fn dynamic_lookup<'a, const LOCKING: bool>( &'a self, filter: &DynamicQueryFilter, entities: impl IntoIterator<Item = Entity> + 'a, ) -> DynamicLookupIter<'a, LOCKING>

Source

pub fn dynamic_lookup_access<'a, const LOCKING: bool>( &'a self, filter: &DynamicQueryFilter, ) -> DynamicLookupAccess<'a, LOCKING>

Source

pub fn relate<const LOCKING: bool, T: Component>( &mut self, payload: T, from: Entity, to: Entity, ) -> Result<(), WorldError>

Source

pub fn unrelate<const LOCKING: bool, T: Component>( &mut self, from: Entity, to: Entity, ) -> Result<(), WorldError>

Source

pub fn unrelate_any<const LOCKING: bool, T: Component>( &mut self, entity: Entity, ) -> Result<(), WorldError>

Source

pub fn has_relation<const LOCKING: bool, T: Component>( &self, from: Entity, to: Entity, ) -> bool

Source

pub fn relations<const LOCKING: bool, T: Component>( &self, ) -> impl Iterator<Item = (Entity, &T, Entity)> + '_

Source

pub fn relations_mut<const LOCKING: bool, T: Component>( &self, ) -> impl Iterator<Item = (Entity, &mut T, Entity)> + '_

Source

pub fn relations_outgoing<const LOCKING: bool, T: Component>( &self, from: Entity, ) -> impl Iterator<Item = (Entity, &T, Entity)> + '_

Source

pub fn relations_outgoing_mut<const LOCKING: bool, T: Component>( &self, from: Entity, ) -> impl Iterator<Item = (Entity, &mut T, Entity)> + '_

Source

pub fn relations_incomming<const LOCKING: bool, T: Component>( &self, to: Entity, ) -> impl Iterator<Item = (Entity, &T, Entity)> + '_

Source

pub fn relations_incomming_mut<const LOCKING: bool, T: Component>( &self, to: Entity, ) -> impl Iterator<Item = (Entity, &mut T, Entity)> + '_

Source

pub fn traverse_outgoing<const LOCKING: bool, T: Component>( &self, entities: impl IntoIterator<Item = Entity>, ) -> RelationsTraverseIter<'_, LOCKING, T>

Source

pub fn traverse_incoming<const LOCKING: bool, T: Component>( &self, entities: impl IntoIterator<Item = Entity>, ) -> RelationsTraverseIter<'_, LOCKING, T>

Trait Implementations§

Source§

impl Default for Systems

Source§

fn default() -> Systems

Returns the “default value” for a type. Read more
Source§

impl Deref for Systems

Source§

type Target = World

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Systems

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Finalize for T

Source§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Initialize for T
where T: Default,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Component for T
where T: Send + Sync + 'static,