pub enum BasicHazardEntity {
PlacedItem {
id: usize,
dt: DTransformation,
pk: PItemKey,
},
Exterior,
Hole {
idx: usize,
},
InferiorQualityZone {
quality: usize,
idx: usize,
},
}Expand description
Entity inducing a Hazard in this crate’s layouts.
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.
Trait Implementations§
Source§impl Clone for BasicHazardEntity
impl Clone for BasicHazardEntity
Source§fn clone(&self) -> BasicHazardEntity
fn clone(&self) -> BasicHazardEntity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BasicHazardEntity
Source§impl Debug for BasicHazardEntity
impl Debug for BasicHazardEntity
impl Eq for BasicHazardEntity
Source§impl<T> From<(PItemKey, T)> for BasicHazardEntitywhere
T: Borrow<PlacedItem>,
impl<T> From<(PItemKey, T)> for BasicHazardEntitywhere
T: Borrow<PlacedItem>,
Source§impl Hash for BasicHazardEntity
impl Hash for BasicHazardEntity
Source§impl HazardEntity for BasicHazardEntity
impl HazardEntity for BasicHazardEntity
Source§fn scope(&self) -> GeoPosition
fn scope(&self) -> GeoPosition
Whether the hazard covers the interior or the exterior of its shape.
An engine needs exactly one exterior hazard.
Source§impl HazardFilter<BasicHazardEntity> for QualityZoneFilter
impl HazardFilter<BasicHazardEntity> for QualityZoneFilter
Source§fn is_irrelevant(&self, _: HazKey, entity: &BasicHazardEntity) -> bool
fn is_irrelevant(&self, _: HazKey, entity: &BasicHazardEntity) -> bool
Whether the hazard registered under
key and induced by entity is ignored.Source§impl PartialEq for BasicHazardEntity
impl PartialEq for BasicHazardEntity
Source§fn eq(&self, other: &BasicHazardEntity) -> bool
fn eq(&self, other: &BasicHazardEntity) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BasicHazardEntity
Auto Trait Implementations§
impl Freeze for BasicHazardEntity
impl RefUnwindSafe for BasicHazardEntity
impl Send for BasicHazardEntity
impl Sync for BasicHazardEntity
impl Unpin for BasicHazardEntity
impl UnsafeUnpin for BasicHazardEntity
impl UnwindSafe for BasicHazardEntity
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