Enum libreda_db::layout::prelude::ContainsResult[][src]

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[src]

pub fn is_within_bounds(&self) -> bool[src]

Tells if the point is contained but does not lie on the bounds.

pub fn inclusive_bounds(&self) -> bool[src]

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

pub fn on_bounds(&self) -> bool[src]

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

pub fn is_no(&self) -> bool[src]

Check if the point lies on the bounds.

pub fn max(self, other: ContainsResult) -> ContainsResult[src]

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

pub fn min(self, other: ContainsResult) -> ContainsResult[src]

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

Trait Implementations

impl Clone for ContainsResult[src]

impl Copy for ContainsResult[src]

impl Debug for ContainsResult[src]

impl Eq for ContainsResult[src]

impl PartialEq<ContainsResult> for ContainsResult[src]

impl StructuralEq for ContainsResult[src]

impl StructuralPartialEq for ContainsResult[src]

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.