Enum geojson::Value [−][src]
The underlying value for a Geometry
.
Conversion from geo_types
A Value
can be created by using the From
impl which is available for both geo_types
primitives AND geo_types::Geometry
enum members:
let point = geo_types::Point::new(2., 9.); let genum = geo_types::Geometry::from(point); assert_eq!( geojson::Value::from(&point), geojson::Value::Point(vec![2., 9.]), ); assert_eq!( geojson::Value::from(&genum), geojson::Value::Point(vec![2., 9.]), );
Variants
Point(PointType)
MultiPoint
LineString(LineStringType)
LineString
MultiLineString(Vec<LineStringType>)
MultiLineString
Polygon(PolygonType)
MultiPolygon(Vec<PolygonType>)
MultiPolygon
GeometryCollection
Implementations
impl Value
[src]
pub fn from_json_object(object: Map<String, JsonValue>) -> Result<Self, Error>
[src]
pub fn from_json_value(value: JsonValue) -> Result<Self, Error>
[src]
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl Display for Value
[src]
impl<'a, T> From<&'a Geometry<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.impl<'a, T> From<&'a GeometryCollection<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.fn from(geometry_collection: &GeometryCollection<T>) -> Self
[src]
impl<'a, T> From<&'a Line<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.impl<'a, T> From<&'a LineString<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.fn from(line_string: &LineString<T>) -> Self
[src]
impl<'a, T> From<&'a MultiLineString<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.fn from(multi_line_string: &MultiLineString<T>) -> Self
[src]
impl<'a, T> From<&'a MultiPoint<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.fn from(multi_point: &MultiPoint<T>) -> Self
[src]
impl<'a, T> From<&'a MultiPolygon<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.fn from(multi_polygon: &MultiPolygon<T>) -> Self
[src]
impl<'a, T> From<&'a Point<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.impl<'a, T> From<&'a Polygon<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.impl<'a, T> From<&'a Rect<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.impl<'a, T> From<&'a Triangle<T>> for Value where
T: CoordFloat,
[src]
T: CoordFloat,
This is supported on crate feature
geo-types
only.impl<'a> From<&'a Value> for Map<String, JsonValue>
[src]
impl<'a> From<&'a Value> for JsonValue
[src]
impl PartialEq<Value> for Value
[src]
impl Serialize for Value
[src]
impl StructuralPartialEq for Value
[src]
impl TryFrom<Map<String, Value>> for Value
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(mut object: Map<String, JsonValue>) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
[src]
impl Send for Value
[src]
impl Sync for Value
[src]
impl Unpin for Value
[src]
impl UnwindSafe for Value
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,