pub struct SweepPoint<T: GeoNum>(/* private fields */);
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.
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>
Conversion from type that can be converted to a Coord
.
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>
Derive Ord
from PartialOrd
and expect to not fail.
impl<T: GeoNum> Ord for SweepPoint<T>
Derive Ord
from PartialOrd
and expect to not fail.
Source§impl<T: GeoNum> PartialOrd for SweepPoint<T>
Implement lexicographic ordering by x
and then by y
coordinate.
impl<T: GeoNum> PartialOrd for SweepPoint<T>
Implement lexicographic ordering by x
and then by y
coordinate.
impl<T: Copy + GeoNum> Copy for SweepPoint<T>
impl<T: GeoNum> Eq for SweepPoint<T>
We derive Eq
manually to not require T: Eq
.
impl<T: GeoNum> StructuralPartialEq for SweepPoint<T>
Auto Trait Implementations§
impl<T> Freeze for SweepPoint<T>where
T: Freeze,
impl<T> RefUnwindSafe for SweepPoint<T>where
T: RefUnwindSafe,
impl<T> Send for SweepPoint<T>where
T: Send,
impl<T> Sync for SweepPoint<T>where
T: Sync,
impl<T> Unpin for SweepPoint<T>where
T: Unpin,
impl<T> UnwindSafe for SweepPoint<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more