Enum iron_shapes::types::ContainsResult
source · pub enum ContainsResult {
No,
OnBounds,
WithinBounds,
}Expand description
This is a result type for containment checks.
NoNot inside.OnBoundsLies on the boundaries.WithinBoundsFully inside.
Variants§
No
Does not contain the point.
OnBounds
Contains the point but on the borders/end-points.
WithinBounds
Fully contains the point.
Implementations§
source§impl ContainsResult
impl ContainsResult
sourcepub fn is_within_bounds(&self) -> bool
pub fn is_within_bounds(&self) -> bool
Tells if the point is contained but does not lie on the bounds.
sourcepub fn inclusive_bounds(&self) -> bool
pub fn inclusive_bounds(&self) -> bool
Tells if the point is contained or lies on the bounds.
sourcepub fn on_bounds(&self) -> bool
pub fn on_bounds(&self) -> bool
Check if the point neither is on the bounds nor within the bounds.
Trait Implementations§
source§impl Clone for ContainsResult
impl Clone for ContainsResult
source§fn clone(&self) -> ContainsResult
fn clone(&self) -> ContainsResult
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 ContainsResult
impl Debug for ContainsResult
source§impl PartialEq<ContainsResult> for ContainsResult
impl PartialEq<ContainsResult> for ContainsResult
source§fn eq(&self, other: &ContainsResult) -> bool
fn eq(&self, other: &ContainsResult) -> bool
This method tests for
self and other values to be equal, and is used
by ==.