Skip to main content

HazardFilter

Trait HazardFilter 

Source
pub trait HazardFilter<E> {
    // Required method
    fn is_irrelevant(&self, key: HazKey, entity: &E) -> bool;
}
Expand description

Decides which Hazards a collision query ignores, by key or by the entity inducing them.

Required Methods§

Source

fn is_irrelevant(&self, key: HazKey, entity: &E) -> bool

Whether the hazard registered under key and induced by entity is ignored.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<E, A: HazardFilter<E>, B: HazardFilter<E>> HazardFilter<E> for (A, B)

Ignores the hazards either filter ignores.

Source§

fn is_irrelevant(&self, key: HazKey, entity: &E) -> bool

Implementors§

Source§

impl HazardFilter<BasicHazardEntity> for QualityZoneFilter

Source§

impl<E> HazardFilter<E> for HazKey

Deems hazards induced by itself as irrelevant.

Source§

impl<E> HazardFilter<E> for HazKeyFilter

Source§

impl<E> HazardFilter<E> for NoFilter