[][src]Enum arcs::algorithms::Closest

pub enum Closest<Space> {
    Infinite,
    One(Point2D<f64, Space>),
    Many(Vec<Point2D<f64, Space>>),
}

An enum containing the different possible solutions for [ClosestPoint::closest_point()].

Variants

Infinite

There are infinitely solutions.

One(Point2D<f64, Space>)

There is a single closest [Point2D].

Many(Vec<Point2D<f64, Space>>)

There are multiple closest [Point2D]s.

Implementations

impl<Space> Closest<Space>[src]

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

Are there infinitely many closest points?

pub fn points(&self) -> &[Point2D<f64, Space>][src]

Get a slice of all the closest [Point2D]s.

Note

This will be empty if there are infinitely many closest points.

Trait Implementations

impl<Space> Clone for Closest<Space> where
    Space: Clone
[src]

impl<Space> Debug for Closest<Space> where
    Space: Debug
[src]

impl<Space> FromIterator<Point2D<f64, Space>> for Closest<Space>[src]

impl<Space> PartialEq<Closest<Space>> for Closest<Space> where
    Space: PartialEq<Space>, 
[src]

impl<Space> StructuralPartialEq for Closest<Space>[src]

Auto Trait Implementations

impl<Space> RefUnwindSafe for Closest<Space> where
    Space: RefUnwindSafe

impl<Space> Send for Closest<Space> where
    Space: Send

impl<Space> Sync for Closest<Space> where
    Space: Sync

impl<Space> Unpin for Closest<Space> where
    Space: Unpin

impl<Space> UnwindSafe for Closest<Space> where
    Space: UnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

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

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

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

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

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<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.