pub enum HazardEntity {
PlacedItem {
id: usize,
dt: DTransformation,
pk: PItemKey,
},
Exterior,
Hole {
idx: usize,
},
InferiorQualityZone {
quality: usize,
idx: usize,
},
}
Expand description
Entity inducing a Hazard
.
All entities are uniquely identified.
Variants§
PlacedItem
An item placed in the layout, defined by its id, applied transformation and key
Exterior
Represents all regions outside the container
Hole
Represents a hole in the container.
InferiorQualityZone
Represents a zone in the container with a specific quality level that is inferior to the base quality.
Implementations§
Source§impl HazardEntity
impl HazardEntity
Sourcepub fn position(&self) -> GeoPosition
pub fn position(&self) -> GeoPosition
Whether the entity induces an ‘interior’ hazard, meaning everything inside its shape is hazardous. Or an ‘exterior’ hazard, meaning everything outside its shape is hazardous.
Trait Implementations§
Source§impl Clone for HazardEntity
impl Clone for HazardEntity
Source§fn clone(&self) -> HazardEntity
fn clone(&self) -> HazardEntity
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HazardEntity
impl Debug for HazardEntity
Source§impl<T> From<(PItemKey, T)> for HazardEntitywhere
T: Borrow<PlacedItem>,
impl<T> From<(PItemKey, T)> for HazardEntitywhere
T: Borrow<PlacedItem>,
Source§impl Hash for HazardEntity
impl Hash for HazardEntity
Source§impl HazardFilter for HazardEntity
Deems hazards induced by self
as irrelevant.
impl HazardFilter for HazardEntity
Deems hazards induced by self
as irrelevant.
fn is_irrelevant(&self, haz: &HazardEntity) -> bool
Source§impl PartialEq for HazardEntity
impl PartialEq for HazardEntity
impl Copy for HazardEntity
impl Eq for HazardEntity
impl StructuralPartialEq for HazardEntity
Auto Trait Implementations§
impl Freeze for HazardEntity
impl RefUnwindSafe for HazardEntity
impl Send for HazardEntity
impl Sync for HazardEntity
impl Unpin for HazardEntity
impl UnwindSafe for HazardEntity
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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