diesel_mysql_spatial/
sql_types.rs

1/// The MySQL `GEOMETRY` type.
2#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
3#[mysql_type = "Blob"]
4pub struct Geometry;
5
6/// The MySQL `POINT` type.
7#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
8#[mysql_type = "Blob"]
9pub struct Point;
10
11/// The MySQL `POLYGON` type.
12#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
13#[mysql_type = "Blob"]
14pub struct Polygon;
15
16/// The MySQL `LINESTRING` type.
17#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
18#[mysql_type = "Blob"]
19pub struct LineString;
20
21/// The MySQL `MULTIPOINT` type.
22#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
23#[mysql_type = "Blob"]
24pub struct MultiPoint;
25
26/// The MySQL `MULTILINESTRING` type.
27#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
28#[mysql_type = "Blob"]
29pub struct MultiLineString;
30
31/// The MySQL `MULTIPOLYGON` type.
32#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
33#[mysql_type = "Blob"]
34pub struct MultiPolygon;
35
36/// The MySQL `GEOMETRYCOLLECTION` type.
37#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
38#[mysql_type = "Blob"]
39pub struct GeometryCollection;
40
41impl From<Point> for Geometry {
42	fn from(_: Point) -> Geometry {
43		Geometry
44	}
45}
46impl From<Polygon> for Geometry {
47	fn from(_: Polygon) -> Geometry {
48		Geometry
49	}
50}
51impl From<LineString> for Geometry {
52	fn from(_: LineString) -> Geometry {
53		Geometry
54	}
55}
56impl From<MultiPoint> for Geometry {
57	fn from(_: MultiPoint) -> Geometry {
58		Geometry
59	}
60}
61impl From<MultiLineString> for Geometry {
62	fn from(_: MultiLineString) -> Geometry {
63		Geometry
64	}
65}
66impl From<MultiPolygon> for Geometry {
67	fn from(_: MultiPolygon) -> Geometry {
68		Geometry
69	}
70}
71impl From<GeometryCollection> for Geometry {
72	fn from(_: GeometryCollection) -> Geometry {
73		Geometry
74	}
75}