pub trait Geometry {
type Kind;
type Point: Point;
}Expand description
Every modelled geometry has a kind (its tag) and a point type it is built from.
Kind matches boost::geometry::traits::tag<G>::type
(boost/geometry/core/tag.hpp); Point matches
boost::geometry::traits::point_type<G>::type
(boost/geometry/core/point_type.hpp). For a value whose own
kind is geometry_tag::PointTag, the Point projection is
Self.
§Examples
Dispatch on the geometry kind via the Kind associated type:
use geometry_tag::PointTag;
use geometry_trait::Geometry;
fn is_point<G: Geometry<Kind = PointTag>>(_g: &G) {}Required Associated Types§
Sourcetype Kind
type Kind
One of the *Tag types from
geometry_tag.
Mirrors boost::geometry::traits::tag<G>::type
(boost/geometry/core/tag.hpp).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".