Enum libreda_db::prelude::ContainsResult
source · [−]pub enum ContainsResult {
No,
OnBounds,
WithinBounds,
}
Expand description
This is a result type for containment checks.
No
Not inside.OnBounds
Lies on the boundaries.WithinBounds
Fully inside.
Variants
No
Does not contain the point.
OnBounds
Contains the point but on the borders/end-points.
WithinBounds
Fully contains the point.
Implementations
sourceimpl 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.
sourcepub 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
sourcepub 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
sourceimpl Clone for ContainsResult
impl Clone for ContainsResult
sourcefn clone(&self) -> ContainsResult
fn clone(&self) -> ContainsResult
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ContainsResult
impl Debug for ContainsResult
sourceimpl PartialEq<ContainsResult> for ContainsResult
impl PartialEq<ContainsResult> for ContainsResult
impl Copy for ContainsResult
impl Eq for ContainsResult
impl StructuralEq for ContainsResult
impl StructuralPartialEq for ContainsResult
Auto Trait Implementations
impl RefUnwindSafe for ContainsResult
impl Send for ContainsResult
impl Sync for ContainsResult
impl Unpin for ContainsResult
impl UnwindSafe for ContainsResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more