Trait PointTrait

Source
pub trait PointTrait: Sized + GeometryTrait {
    type CoordType<'a>: 'a + CoordTrait<T = <Self as GeometryTrait>::T>
       where Self: 'a;

    // Required method
    fn coord(&self) -> Option<Self::CoordType<'_>>;
}
Expand description

A trait for accessing data from a generic Point.

Refer to geo_types::Point for information about semantics and validity.

Required Associated Types§

Source

type CoordType<'a>: 'a + CoordTrait<T = <Self as GeometryTrait>::T> where Self: 'a

The coordinate type of this geometry The type of the underlying coordinate, which implements CoordTrait

Required Methods§

Source

fn coord(&self) -> Option<Self::CoordType<'_>>

The location of this 0-dimensional geometry.

According to Simple Features, a Point can have zero coordinates and be considered “empty”.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: CoordNum> PointTrait for &Point<T>

Source§

type CoordType<'a> = Coord<<&Point<T> as GeometryTrait>::T> where Self: 'a

Source§

fn coord(&self) -> Option<Self::CoordType<'_>>

Source§

impl<T: CoordNum> PointTrait for Point<T>

Source§

type CoordType<'a> = Coord<<Point<T> as GeometryTrait>::T> where Self: 'a

Source§

fn coord(&self) -> Option<Self::CoordType<'_>>

Implementors§