pub struct QuerySpec { /* private fields */ }Expand description
Immutable description of which entities a query should visit and how to filter them.
Implementations§
Source§impl QuerySpec
impl QuerySpec
Sourcepub fn new() -> Self
pub fn new() -> Self
Empty spec that matches entities with no additional structural constraints.
Sourcepub fn with_id(self, id: ComponentId) -> Self
pub fn with_id(self, id: ComponentId) -> Self
Require a registered data component by ComponentId.
Sourcepub fn without_id(self, id: ComponentId) -> Self
pub fn without_id(self, id: ComponentId) -> Self
Exclude entities that have the component id.
Sourcepub fn with_tag_id(self, id: ComponentId) -> Self
pub fn with_tag_id(self, id: ComponentId) -> Self
Require a registered tag marker by ComponentId.
Sourcepub fn without_tag<T: 'static>(self) -> Self
pub fn without_tag<T: 'static>(self) -> Self
Exclude entities that carry the tag marker type.
Sourcepub fn without_tag_id(self, id: ComponentId) -> Self
pub fn without_tag_id(self, id: ComponentId) -> Self
Exclude entities that carry the tag marker id.
Sourcepub fn added<T: 'static>(self) -> Self
pub fn added<T: 'static>(self) -> Self
Require the component to be added inside the active change window.
Sourcepub fn added_id(self, id: ComponentId) -> Self
pub fn added_id(self, id: ComponentId) -> Self
Require the component id to be added inside the active change window.
Sourcepub fn changed<T: 'static>(self) -> Self
pub fn changed<T: 'static>(self) -> Self
Require the component to change inside the active change window.
Sourcepub fn changed_id(self, id: ComponentId) -> Self
pub fn changed_id(self, id: ComponentId) -> Self
Require the component id to change inside the active change window.
Sourcepub fn exact_ids(self, ids: Vec<EntityId>, policy: ExactIdPolicy) -> Self
pub fn exact_ids(self, ids: Vec<EntityId>, policy: ExactIdPolicy) -> Self
Visit only the listed entity ids in caller order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuerySpec
impl RefUnwindSafe for QuerySpec
impl Send for QuerySpec
impl Sync for QuerySpec
impl Unpin for QuerySpec
impl UnsafeUnpin for QuerySpec
impl UnwindSafe for QuerySpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more