pub trait ContiguousQueryData: ArchetypeQueryData + IterQueryData {
type Contiguous<'w, 's>;
// Required method
unsafe fn fetch_contiguous<'w, 's>(
state: &'s Self::State,
fetch: &mut Self::Fetch<'w>,
entities: &'w [Entity],
) -> Self::Contiguous<'w, 's>;
}Expand description
A QueryData which allows getting a direct access to contiguous chunks of components’
values, which may be used to apply simd-operations.
Contiguous iteration may be done via:
Required Associated Types§
Sourcetype Contiguous<'w, 's>
type Contiguous<'w, 's>
Item returned by ContiguousQueryData::fetch_contiguous.
Represents a contiguous chunk of memory.
Required Methods§
Sourceunsafe fn fetch_contiguous<'w, 's>(
state: &'s Self::State,
fetch: &mut Self::Fetch<'w>,
entities: &'w [Entity],
) -> Self::Contiguous<'w, 's>
unsafe fn fetch_contiguous<'w, 's>( state: &'s Self::State, fetch: &mut Self::Fetch<'w>, entities: &'w [Entity], ) -> Self::Contiguous<'w, 's>
Fetch ContiguousQueryData::Contiguous which represents a contiguous chunk of memory (e.g., an array) in the current Table.
This must always be called after WorldQuery::set_table.
§Safety
- Must always be called after
WorldQuery::set_table. entities’s length must match the length of the set table.entitiesmust match the entities of the set table.- There must not be simultaneous conflicting component access registered in
update_component_access.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.