Enum libreda_pnr::db::ContainsResult[]

pub enum ContainsResult {
    No,
    OnBounds,
    WithinBounds,
}

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

impl ContainsResult

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

Tells if the point is contained or lies on the bounds.

pub fn on_bounds(&self) -> bool

Check if the point neither is on the bounds nor within the bounds.

pub fn is_no(&self) -> bool

Check if the point lies on the bounds.

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

Returns the weaker result of the both. Ordering from weak to strong is No, OnBounds, WithinBounds

Trait Implementations

impl Clone for ContainsResult

impl Copy for ContainsResult

impl Debug for ContainsResult

impl Eq for ContainsResult

impl PartialEq<ContainsResult> for ContainsResult

impl StructuralEq for ContainsResult

impl StructuralPartialEq for ContainsResult

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.