Enum libreda_pnr::db::ContainsResult
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§
§impl ContainsResult
impl ContainsResult
pub 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.
pub fn inclusive_bounds(&self) -> bool
pub fn inclusive_bounds(&self) -> bool
Tells if the point is contained or lies on the bounds.
pub fn max(self, other: ContainsResult) -> ContainsResult
pub fn max(self, other: ContainsResult) -> ContainsResult
Returns the stronger result of the both.
Ordering from weak to strong is No, OnBounds, WithinBounds
pub fn min(self, other: ContainsResult) -> ContainsResult
pub fn min(self, other: ContainsResult) -> ContainsResult
Returns the weaker result of the both.
Ordering from weak to strong is No, OnBounds, WithinBounds
Trait Implementations§
§impl Clone for ContainsResult
impl Clone for ContainsResult
§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 more§impl Debug for ContainsResult
impl Debug for ContainsResult
§impl PartialEq<ContainsResult> for ContainsResult
impl PartialEq<ContainsResult> for ContainsResult
§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 ==.