Enum geojson::Value [−][src]
pub enum Value { Point(PointType), MultiPoint(Vec<PointType>), LineString(LineStringType), MultiLineString(Vec<LineStringType>), Polygon(PolygonType), MultiPolygon(Vec<PolygonType>), GeometryCollection(Vec<Geometry>), }
The underlying Geometry value
Conversion from geo_types
From
is implemented for Value
for converting from geo_types
geospatial
types:
extern crate geo_types; extern crate geojson; let point = geo_types::Point::new(2., 9.); assert_eq!( geojson::Value::from(&point), geojson::Value::Point(vec![2., 9.]), );
Variants
Point(PointType)
Point
[GeoJSON Format Specification § 3.1.2] (https://tools.ietf.org/html/rfc7946#section-3.1.2
MultiPoint(Vec<PointType>)
MultiPoint
[GeoJSON Format Specification § 3.1.3] (https://tools.ietf.org/html/rfc7946#section-3.1.3
LineString(LineStringType)
LineString
[GeoJSON Format Specification § 3.1.4] (https://tools.ietf.org/html/rfc7946#section-3.1.4
MultiLineString(Vec<LineStringType>)
MultiLineString
[GeoJSON Format Specification § 3.1.5] (https://tools.ietf.org/html/rfc7946#section-3.1.5)
Polygon(PolygonType)
Polygon
[GeoJSON Format Specification § 3.1.6] (https://tools.ietf.org/html/rfc7946#section-3.1.6)
MultiPolygon(Vec<PolygonType>)
MultiPolygon
[GeoJSON Format Specification § 3.1.7] (https://tools.ietf.org/html/rfc7946#section-3.1.7)
GeometryCollection(Vec<Geometry>)
GeometryCollection
[GeoJSON Format Specification § 3.1.8] (https://tools.ietf.org/html/rfc7946#section-3.1.8)
Trait Implementations
impl Clone for Value
[src]
impl Clone for Value
fn clone(&self) -> Value
[src]
fn clone(&self) -> Value
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Value
[src]
impl Debug for Value
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Value
[src]
impl PartialEq for Value
fn eq(&self, other: &Value) -> bool
[src]
fn eq(&self, other: &Value) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Value) -> bool
[src]
fn ne(&self, other: &Value) -> bool
This method tests for !=
.
impl<'a> From<&'a Value> for JsonValue
[src]
impl<'a> From<&'a Value> for JsonValue
impl Serialize for Value
[src]
impl Serialize for Value
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> TryInto<Point<T>> for Value where
T: Float,
[src]
impl<T> TryInto<Point<T>> for Value where
T: Float,
impl<'a, T> From<&'a Point<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a Point<T>> for Value where
T: Float,
impl<T> TryInto<MultiPoint<T>> for Value where
T: Float,
[src]
impl<T> TryInto<MultiPoint<T>> for Value where
T: Float,
impl<'a, T> From<&'a MultiPoint<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a MultiPoint<T>> for Value where
T: Float,
fn from(multi_point: &MultiPoint<T>) -> Self
[src]
fn from(multi_point: &MultiPoint<T>) -> Self
Performs the conversion.
impl<T> TryInto<LineString<T>> for Value where
T: Float,
[src]
impl<T> TryInto<LineString<T>> for Value where
T: Float,
impl<'a, T> From<&'a LineString<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a LineString<T>> for Value where
T: Float,
fn from(line_string: &LineString<T>) -> Self
[src]
fn from(line_string: &LineString<T>) -> Self
Performs the conversion.
impl<T> TryInto<MultiLineString<T>> for Value where
T: Float,
[src]
impl<T> TryInto<MultiLineString<T>> for Value where
T: Float,
impl<'a, T> From<&'a MultiLineString<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a MultiLineString<T>> for Value where
T: Float,
fn from(multi_line_string: &MultiLineString<T>) -> Self
[src]
fn from(multi_line_string: &MultiLineString<T>) -> Self
Performs the conversion.
impl<T> TryInto<Polygon<T>> for Value where
T: Float,
[src]
impl<T> TryInto<Polygon<T>> for Value where
T: Float,
impl<'a, T> From<&'a Polygon<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a Polygon<T>> for Value where
T: Float,
impl<T> TryInto<MultiPolygon<T>> for Value where
T: Float,
[src]
impl<T> TryInto<MultiPolygon<T>> for Value where
T: Float,
impl<'a, T> From<&'a MultiPolygon<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a MultiPolygon<T>> for Value where
T: Float,
fn from(multi_polygon: &MultiPolygon<T>) -> Self
[src]
fn from(multi_polygon: &MultiPolygon<T>) -> Self
Performs the conversion.
impl<T> TryInto<GeometryCollection<T>> for Value where
T: Float,
[src]
impl<T> TryInto<GeometryCollection<T>> for Value where
T: Float,
impl<T> TryInto<Geometry<T>> for Value where
T: Float,
[src]
impl<T> TryInto<Geometry<T>> for Value where
T: Float,
impl<'a, T> From<&'a GeometryCollection<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a GeometryCollection<T>> for Value where
T: Float,
fn from(geometry_collection: &GeometryCollection<T>) -> Self
[src]
fn from(geometry_collection: &GeometryCollection<T>) -> Self
Performs the conversion.
impl<'a, T> From<&'a Geometry<T>> for Value where
T: Float,
[src]
impl<'a, T> From<&'a Geometry<T>> for Value where
T: Float,