[−][src]Struct bevy_ecs::QueryBorrowChecked
A borrow of a World
sufficient to execute the query Q
Note that borrows are not released until this object is dropped.
Implementations
impl<'w, Q: HecsQuery> QueryBorrowChecked<'w, Q>
[src]
pub fn iter<'q>(&'q mut self) -> QueryIter<'q, 'w, Q>
[src]
Execute the query
Must be called only once per query.
pub fn par_iter<'q>(&'q mut self, batch_size: usize) -> ParIter<'q, 'w, Q>
[src]
Like iter
, but returns child iterators of at most batch_size
elements
Useful for distributing work over a threadpool using the ParallelIterator interface.
Batch size needs to be chosen based on the task being done in parallel. The elements in each batch are computed serially, while the batches themselves are computed in parallel.
A too small batch size can cause too much overhead, since scheduling each batch could take longer than running the batch. On the other hand, a too large batch size risks that one batch is still running long after the rest have finished.
Trait Implementations
impl<'w, Q: HecsQuery> Drop for QueryBorrowChecked<'w, Q>
[src]
impl<'q, 'w, Q: HecsQuery> IntoIterator for &'q mut QueryBorrowChecked<'w, Q>
[src]
type IntoIter = QueryIter<'q, 'w, Q>
Which kind of iterator are we turning this into?
type Item = <Q::Fetch as Fetch<'q>>::Item
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<'w, Q: HecsQuery> Send for QueryBorrowChecked<'w, Q>
[src]
impl<'w, Q: HecsQuery> Sync for QueryBorrowChecked<'w, Q>
[src]
Auto Trait Implementations
impl<'w, Q> !RefUnwindSafe for QueryBorrowChecked<'w, Q>
impl<'w, Q> Unpin for QueryBorrowChecked<'w, Q> where
Q: Unpin,
Q: Unpin,
impl<'w, Q> !UnwindSafe for QueryBorrowChecked<'w, Q>
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,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
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, 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,