ArchFilter

Trait ArchFilter 

Source
pub unsafe trait ArchFilter: Sized {
    // Required method
    unsafe fn filter<'a>(
        arch_storage: *const ArchEntityStorage,
        index: ArchStorageIndex,
        comp_factory: &'a ComponentFactory,
    ) -> impl FilterResult;
}

Required Methods§

Source

unsafe fn filter<'a>( arch_storage: *const ArchEntityStorage, index: ArchStorageIndex, comp_factory: &'a ComponentFactory, ) -> impl FilterResult

§Safety
  1. The caller must ensure that the ArchStorageIndex is withing the bounds of the [ArchStorage] (as specified in [ArchStorage::get_component_unchecked]).
  2. The caller must ensure that the raw pointer to [ArchStorage] is valid, and usable.

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.

Implementors§

Source§

impl<Q> ArchFilter for Q
where Q: ArchQuery, <Q as ArchQuery>::Item<'a>: for<'a> FilterResult,