pub unsafe trait ArchQuery {
type Item<'a>;
// Required method
unsafe fn fetch(
arch_storage: *mut ArchEntityStorage,
index: ArchStorageIndex,
comp_factory: &ComponentFactory,
) -> Self::Item<'_>;
// Provided methods
fn merge_prime_arch_key_with(
_pkey: &mut PrimeArchKey,
_comp_factory: &ComponentFactory,
) { ... }
unsafe fn iter_query_matches<'a>(
arch_storages: *mut ArchStorages,
comp_factory: &'a ComponentFactory,
) -> impl Iterator<Item = Self::Item<'a>> + 'a { ... }
unsafe fn iter_filtered_query_matches<F: ArchFilter>(
arch_storages: *mut ArchStorages,
comp_factory: &ComponentFactory,
) -> impl Iterator<Item = Self::Item<'_>> { ... }
}Required Associated Types§
Required Methods§
Sourceunsafe fn fetch(
arch_storage: *mut ArchEntityStorage,
index: ArchStorageIndex,
comp_factory: &ComponentFactory,
) -> Self::Item<'_>
unsafe fn fetch( arch_storage: *mut ArchEntityStorage, index: ArchStorageIndex, comp_factory: &ComponentFactory, ) -> Self::Item<'_>
§Safety
- The caller must ensure that the
ArchStorageIndexis withing the bounds of the [ArchStorage] (as specified in [ArchStorage::get_component_unchecked]). - The caller must ensure that the raw pointer to [
ArchStorage] is valid, and usable.
Provided Methods§
fn merge_prime_arch_key_with( _pkey: &mut PrimeArchKey, _comp_factory: &ComponentFactory, )
Sourceunsafe fn iter_query_matches<'a>(
arch_storages: *mut ArchStorages,
comp_factory: &'a ComponentFactory,
) -> impl Iterator<Item = Self::Item<'a>> + 'a
unsafe fn iter_query_matches<'a>( arch_storages: *mut ArchStorages, comp_factory: &'a ComponentFactory, ) -> impl Iterator<Item = Self::Item<'a>> + 'a
§Safety
- The caller must ensure that the raw pointer to
ArchStoragesis valid, and usable.
Sourceunsafe fn iter_filtered_query_matches<F: ArchFilter>(
arch_storages: *mut ArchStorages,
comp_factory: &ComponentFactory,
) -> impl Iterator<Item = Self::Item<'_>>
unsafe fn iter_filtered_query_matches<F: ArchFilter>( arch_storages: *mut ArchStorages, comp_factory: &ComponentFactory, ) -> impl Iterator<Item = Self::Item<'_>>
§Safety
- The caller must ensure that the raw pointer to
ArchStoragesis valid, and usable.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".