[−][src]Struct legion::prelude::SubWorld
Provides access to a subset of the entities of a World
.
Implementations
impl<'a> SubWorld<'a>
[src]
pub unsafe fn new_unchecked(
world: &'a World,
access: &'a Access<ComponentTypeId>,
archetypes: &'a ArchetypeAccess
) -> SubWorld<'a>
[src]
world: &'a World,
access: &'a Access<ComponentTypeId>,
archetypes: &'a ArchetypeAccess
) -> SubWorld<'a>
Constructs a new SubWorld.
Safety
Queries assume that this type has been constructed correctly. Ensure that sub-worlds represent disjoint portions of a world and that the world is not used while any of its sub-worlds are alive.
pub fn split<'b, T>(&'b mut self) -> (SubWorld<'b>, SubWorld<'b>) where
'a: 'b,
T: for<'v> View<'v>,
[src]
'a: 'b,
T: for<'v> View<'v>,
Splits the world into two. The left world allows access only to the data declared by the view; the right world allows access to all else.
pub fn split_for_query<V, F>(&mut self, &'q Query<V, F>) -> (SubWorld, SubWorld) where
F: EntityFilter,
V: for<'v> View<'v>,
[src]
F: EntityFilter,
V: for<'v> View<'v>,
Splits the world into two. The left world allows access only to the data declared by the query's view; the right world allows access to all else.
Trait Implementations
impl<'a> Clone for SubWorld<'a>
[src]
impl<'a> EntityStore for SubWorld<'a>
[src]
fn get_component<T>(&self, entity: Entity) -> Option<Ref<T>> where
T: Component,
[src]
T: Component,
unsafe fn get_component_mut_unchecked<T>(
&self,
entity: Entity
) -> Option<RefMut<T>> where
T: Component,
[src]
&self,
entity: Entity
) -> Option<RefMut<T>> where
T: Component,
fn get_tag<T>(&self, entity: Entity) -> Option<&T> where
T: Tag,
[src]
T: Tag,
fn is_alive(&self, entity: Entity) -> bool
[src]
fn get_component_storage<V>(
&self
) -> Result<StorageAccessor, ComponentAccessError> where
V: for<'b> View<'b>,
[src]
&self
) -> Result<StorageAccessor, ComponentAccessError> where
V: for<'b> View<'b>,
fn get_component_mut<T>(&mut self, entity: Entity) -> Option<RefMut<T>> where
T: Component,
[src]
T: Component,
impl<'a> From<&'a mut World> for SubWorld<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SubWorld<'a>
impl<'a> Send for SubWorld<'a>
impl<'a> Sync for SubWorld<'a>
impl<'a> Unpin for SubWorld<'a>
impl<'a> !UnwindSafe for SubWorld<'a>
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> Component for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,