Struct geo_types::Coordinate
source · pub struct Coordinate<T>where
T: CoordinateType,{
pub x: T,
pub y: T,
}
Expand description
A lightweight struct used to store coordinates on the 2-dimensional Cartesian plane.
Unlike Point
(which in the future may contain additional information such
as an envelope, a precision model, and spatial reference system
information), a Coordinate
only contains ordinate values and accessor
methods.
Fields
x: T
y: T
Implementations
sourceimpl<T> Coordinate<T>where
T: CoordinateType + ToPrimitive,
impl<T> Coordinate<T>where
T: CoordinateType + ToPrimitive,
Trait Implementations
sourceimpl<T: Clone> Clone for Coordinate<T>where
T: CoordinateType,
impl<T: Clone> Clone for Coordinate<T>where
T: CoordinateType,
sourcefn clone(&self) -> Coordinate<T>
fn clone(&self) -> Coordinate<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for Coordinate<T>where
T: CoordinateType,
impl<T: Debug> Debug for Coordinate<T>where
T: CoordinateType,
sourceimpl<T: CoordinateType> From<[T; 2]> for Coordinate<T>
impl<T: CoordinateType> From<[T; 2]> for Coordinate<T>
sourceimpl<T: CoordinateType> From<(T, T)> for Coordinate<T>
impl<T: CoordinateType> From<(T, T)> for Coordinate<T>
sourceimpl<T: CoordinateType> From<Coordinate<T>> for Point<T>
impl<T: CoordinateType> From<Coordinate<T>> for Point<T>
sourcefn from(x: Coordinate<T>) -> Point<T>
fn from(x: Coordinate<T>) -> Point<T>
Converts to this type from the input type.
sourceimpl<T: CoordinateType> From<Point<T>> for Coordinate<T>
impl<T: CoordinateType> From<Point<T>> for Coordinate<T>
sourceimpl<T: PartialEq> PartialEq<Coordinate<T>> for Coordinate<T>where
T: CoordinateType,
impl<T: PartialEq> PartialEq<Coordinate<T>> for Coordinate<T>where
T: CoordinateType,
sourcefn eq(&self, other: &Coordinate<T>) -> bool
fn eq(&self, other: &Coordinate<T>) -> bool
impl<T: Copy> Copy for Coordinate<T>where
T: CoordinateType,
impl<T> StructuralPartialEq for Coordinate<T>where
T: CoordinateType,
Auto Trait Implementations
impl<T> RefUnwindSafe for Coordinate<T>where
T: RefUnwindSafe,
impl<T> Send for Coordinate<T>where
T: Send,
impl<T> Sync for Coordinate<T>where
T: Sync,
impl<T> Unpin for Coordinate<T>where
T: Unpin,
impl<T> UnwindSafe for Coordinate<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more