Struct boostvoronoi::Point
source · pub struct Point<T>where
T: InputType,{
pub x: T,
pub y: T,
}
Expand description
A really simple 2d coordinate container type - integer only
Fields§
§x: T
§y: T
Implementations§
Trait Implementations§
source§impl<T> From<&Point<T>> for Point<T>where
T: InputType,
impl<T> From<&Point<T>> for Point<T>where
T: InputType,
source§fn from(point: &Point<T>) -> Point<T>
fn from(point: &Point<T>) -> Point<T>
A copy conversion from &boostvoronoi::geometry::Point
to boostvoronoi::geometry::Point
This makes it possible to accept an Iter<Into<Point>>
and Iter<&Point>
in the same method.
let c = [1,2];
let p1:Point<i32> = Point::from(c);
let p2:Point<i32> = Point::from(&p1);
assert_eq!(p2.x,c[0]);
assert_eq!(p2.y,c[1]);
source§impl<T> PartialEq for Point<T>
impl<T> PartialEq for Point<T>
source§impl<T> PartialOrd for Point<T>where
T: PartialOrd + InputType,
impl<T> PartialOrd for Point<T>where
T: PartialOrd + InputType,
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 for Point<T>
impl<T> Eq for Point<T>
impl<T> StructuralEq for Point<T>where
T: InputType,
impl<T> StructuralPartialEq for Point<T>where
T: InputType,
Auto Trait Implementations§
impl<T> RefUnwindSafe for Point<T>where
T: RefUnwindSafe,
impl<T> Send for Point<T>where
T: Send,
impl<T> Sync for Point<T>
impl<T> Unpin for Point<T>
impl<T> UnwindSafe for Point<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