pub trait HazardDetector: HazardIgnorer {
// Required methods
fn contains(&self, haz: &HazardEntity) -> bool;
fn push(&mut self, haz: HazardEntity);
fn remove(&mut self, haz: &HazardEntity);
fn len(&self) -> usize;
fn iter(&self) -> impl Iterator<Item = &HazardEntity>;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
Trait for structs that can track and store already detected hazards.
Interface made to mimic a Vec of HazardEntity
s.
Required Methods§
fn contains(&self, haz: &HazardEntity) -> bool
fn push(&mut self, haz: HazardEntity)
fn remove(&mut self, haz: &HazardEntity)
fn len(&self) -> usize
fn iter(&self) -> impl Iterator<Item = &HazardEntity>
Provided Methods§
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.