pub struct DetectionMap { /* private fields */ }
Expand description
Datastructure to register which Hazards are detected during collision collection. Hazards caused by placed items have instant lookups, the others are stored in a Vec. It also stores an index for each hazard, which can be used to determine the order in which they were detected.
Implementations§
Source§impl DetectionMap
impl DetectionMap
pub fn new() -> Self
pub fn clear(&mut self)
pub fn iter_with_index(&self) -> impl Iterator<Item = &(HazardEntity, usize)>
pub fn index_counter(&self) -> usize
Trait Implementations§
Source§impl Debug for DetectionMap
impl Debug for DetectionMap
Source§impl HazardDetector for DetectionMap
impl HazardDetector for DetectionMap
Source§impl HazardIgnorer for DetectionMap
impl HazardIgnorer for DetectionMap
fn is_irrelevant(&self, haz: &HazardEntity) -> bool
Auto Trait Implementations§
impl Freeze for DetectionMap
impl RefUnwindSafe for DetectionMap
impl Send for DetectionMap
impl Sync for DetectionMap
impl Unpin for DetectionMap
impl UnwindSafe for DetectionMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more