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> PartialOrd for Point<T>where
T: PartialOrd + InputType,
impl<T> PartialOrd for Point<T>where
T: PartialOrd + InputType,
impl<T> Copy for Point<T>
impl<T> Eq for Point<T>
impl<T> StructuralPartialEq for Point<T>where
T: InputType,
Auto Trait Implementations§
impl<T> Freeze for Point<T>where
T: Freeze,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more