geometry_tag/tag.rs
1//! The eleven empty tag types that identify a geometry kind.
2//!
3//! Each tag is a zero-sized struct — its sole purpose is to serve as a
4//! type-level identity used by `Geometry::Kind` and by trait-bound
5//! dispatch. The C++ counterparts live in `boost/geometry/core/tags.hpp`.
6//!
7//! # Examples
8//!
9//! Every tag is a zero-sized identifier:
10//!
11//! ```
12//! use geometry_tag::{
13//! BoxTag, GeometryCollectionTag, LinestringTag, MultiLinestringTag,
14//! MultiPointTag, MultiPolygonTag, PointTag, PolygonTag,
15//! PolyhedralSurfaceTag, RingTag, SegmentTag,
16//! };
17//! let _ = (
18//! PointTag, SegmentTag, LinestringTag, RingTag, PolygonTag, BoxTag,
19//! MultiPointTag, MultiLinestringTag, MultiPolygonTag,
20//! GeometryCollectionTag, PolyhedralSurfaceTag,
21//! );
22//! ```
23
24/// OGC Point identifying tag — `boost/geometry/core/tags.hpp:91`.
25#[derive(Debug, Default, Clone, Copy)]
26pub struct PointTag;
27
28/// Convenience segment (2-points) identifying tag — `boost/geometry/core/tags.hpp:106`.
29#[derive(Debug, Default, Clone, Copy)]
30pub struct SegmentTag;
31
32/// OGC Linestring identifying tag — `boost/geometry/core/tags.hpp:94`.
33#[derive(Debug, Default, Clone, Copy)]
34pub struct LinestringTag;
35
36/// Convenience linear ring identifying tag — `boost/geometry/core/tags.hpp:100`.
37#[derive(Debug, Default, Clone, Copy)]
38pub struct RingTag;
39
40/// OGC Polygon identifying tag — `boost/geometry/core/tags.hpp:97`.
41#[derive(Debug, Default, Clone, Copy)]
42pub struct PolygonTag;
43
44/// 2D or 3D axis-aligned box (mbr / aabb) identifying tag — `boost/geometry/core/tags.hpp:103`.
45#[derive(Debug, Default, Clone, Copy)]
46pub struct BoxTag;
47
48/// OGC `MultiPoint` identifying tag — `boost/geometry/core/tags.hpp:113`.
49#[derive(Debug, Default, Clone, Copy)]
50pub struct MultiPointTag;
51
52/// OGC `MultiLinestring` identifying tag — `boost/geometry/core/tags.hpp:116`.
53#[derive(Debug, Default, Clone, Copy)]
54pub struct MultiLinestringTag;
55
56/// OGC `MultiPolygon` identifying tag — `boost/geometry/core/tags.hpp:119`.
57#[derive(Debug, Default, Clone, Copy)]
58pub struct MultiPolygonTag;
59
60/// OGC Geometry Collection identifying tag — `boost/geometry/core/tags.hpp:122`.
61#[derive(Debug, Default, Clone, Copy)]
62pub struct GeometryCollectionTag;
63
64/// OGC Polyhedral surface identifying tag — `boost/geometry/core/tags.hpp:109`.
65#[derive(Debug, Default, Clone, Copy)]
66pub struct PolyhedralSurfaceTag;
67
68/// Runtime-tagged (variant) geometry identifying tag —
69/// `boost/geometry/core/tags.hpp:124` (`dynamic_geometry_tag`). Marks a
70/// value whose OGC kind is decided at runtime, e.g. `DynGeometry`.
71#[derive(Debug, Default, Clone, Copy)]
72pub struct DynamicGeometryTag;