Struct WorldView

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

Implementations§

Source§

impl WorldView

Source

pub fn new<B: BundleColumns>(world: &World) -> Self

Source

pub fn with<B: BundleColumns>(self, world: &World) -> Self

Source

pub fn with_raw(self, world: &World, columns: &[ArchetypeColumnInfo]) -> Self

Source

pub fn include<B: BundleColumns>(&mut self, world: &World)

Source

pub fn include_raw(&mut self, world: &World, columns: &[ArchetypeColumnInfo])

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

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

Source

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

Source

pub fn entity_by_index(&self, index: usize) -> Option<Entity>

Source

pub fn entities_range( &self, range: impl RangeBounds<usize>, ) -> impl Iterator<Item = Entity> + '_

Source

pub fn entities_work_group( &self, group_index: usize, groups_count: usize, min_items_per_group: usize, ) -> impl Iterator<Item = Entity> + '_

Source

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

Source

pub fn find_with<const LOCKING: bool, T: Component>( &self, f: impl Fn(&T) -> bool, ) -> Option<Entity>

Source

pub fn entity<'a, const LOCKING: bool, Fetch: TypedLookupFetch<'a, LOCKING>>( &'a self, entity: Entity, ) -> Option<Fetch::Value>

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>

Trait Implementations§

Source§

impl Clone for WorldView

Source§

fn clone(&self) -> WorldView

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for WorldView

Source§

fn default() -> WorldView

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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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,