Struct geo::algorithm::sweep::SweepPoint
source · pub struct SweepPoint<T: GeoNum>(_);Expand description
A lexicographically ordered point.
A wrapper around Coord to order the point by x, and then by y.
Implements Ord and Eq, allowing usage in ordered collections such as
BinaryHeap.
Note that the scalar type T is only required to implement PartialOrd.
Thus, it is a logical error to construct this struct unless the coords are
guaranteed to be orderable.
Methods from Deref<Target = Coord<T>>§
Trait Implementations§
source§impl<T: Clone + GeoNum> Clone for SweepPoint<T>
impl<T: Clone + GeoNum> Clone for SweepPoint<T>
source§fn clone(&self) -> SweepPoint<T>
fn clone(&self) -> SweepPoint<T>
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 moresource§impl<T: GeoNum> Debug for SweepPoint<T>
impl<T: GeoNum> Debug for SweepPoint<T>
source§impl<T: GeoNum> Deref for SweepPoint<T>
impl<T: GeoNum> Deref for SweepPoint<T>
source§impl<T: GeoNum> From<SweepPoint<T>> for LineOrPoint<T>
impl<T: GeoNum> From<SweepPoint<T>> for LineOrPoint<T>
source§fn from(pt: SweepPoint<T>) -> Self
fn from(pt: SweepPoint<T>) -> Self
Converts to this type from the input type.
source§impl<T: GeoNum, X: Into<Coord<T>>> From<X> for SweepPoint<T>
impl<T: GeoNum, X: Into<Coord<T>>> From<X> for SweepPoint<T>
Conversion from type that can be converted to a Coord.
source§impl<T: GeoNum> Ord for SweepPoint<T>
impl<T: GeoNum> Ord for SweepPoint<T>
Derive Ord from PartialOrd and expect to not fail.
source§impl<T: PartialEq + GeoNum> PartialEq<SweepPoint<T>> for SweepPoint<T>
impl<T: PartialEq + GeoNum> PartialEq<SweepPoint<T>> for SweepPoint<T>
source§fn eq(&self, other: &SweepPoint<T>) -> bool
fn eq(&self, other: &SweepPoint<T>) -> bool
source§impl<T: GeoNum> PartialOrd<SweepPoint<T>> for SweepPoint<T>
impl<T: GeoNum> PartialOrd<SweepPoint<T>> for SweepPoint<T>
Implement lexicographic ordering by x and then by y
coordinate.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<T: Copy + GeoNum> Copy for SweepPoint<T>
impl<T: GeoNum> Eq for SweepPoint<T>
We derive Eq manually to not require T: Eq.