pub trait WorldQuery {
type StaticType: 'static;
type Fetch<'w>: Copy;
type Item<'w>;
type Slice<'w>;
// Required methods
unsafe fn fetch_raw<'w>(
world: &'w World,
arch: &Archetype,
system_tick: u32,
) -> Option<Self::Fetch<'w>>;
fn check_aliasing(types: &mut Vec<(TypeId, bool)>);
fn matches_archetype(arch: &Archetype) -> bool;
unsafe fn get_item<'w>(
fetch: Self::Fetch<'w>,
row: usize,
entity_id: u32,
) -> Self::Item<'w>;
unsafe fn filter_row<'w>(
fetch: Self::Fetch<'w>,
row: usize,
entity_id: u32,
system_tick: u32,
) -> bool;
unsafe fn get_slice<'w>(
fetch: Self::Fetch<'w>,
len: usize,
) -> Self::Slice<'w>;
}Required Associated Types§
Required Methods§
Sourceunsafe fn fetch_raw<'w>(
world: &'w World,
arch: &Archetype,
system_tick: u32,
) -> Option<Self::Fetch<'w>>
unsafe fn fetch_raw<'w>( world: &'w World, arch: &Archetype, system_tick: u32, ) -> Option<Self::Fetch<'w>>
§Safety
Archetype geçerli olmalı ve döndürülen fetch pointer’ı archetype’ın yaşam süresi boyunca geçerli kalmalıdır.
fn check_aliasing(types: &mut Vec<(TypeId, bool)>)
fn matches_archetype(arch: &Archetype) -> bool
Sourceunsafe fn get_item<'w>(
fetch: Self::Fetch<'w>,
row: usize,
entity_id: u32,
) -> Self::Item<'w>
unsafe fn get_item<'w>( fetch: Self::Fetch<'w>, row: usize, entity_id: u32, ) -> Self::Item<'w>
§Safety
row değeri archetype’ın eleman sayısından küçük olmalıdır.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".