Struct geojson::Geometry [−][src]
pub struct Geometry { pub bbox: Option<Bbox>, pub value: Value, pub foreign_members: Option<Map<String, JsonValue>>, }
Geometry Objects
[GeoJSON Format Specification § 3.1] (https://tools.ietf.org/html/rfc7946#section-3.1)
Fields
bbox: Option<Bbox>
value: Value
foreign_members: Option<Map<String, JsonValue>>
Foreign Members
[RFC7946 § 6] (https://tools.ietf.org/html/rfc7946#section-6)
Methods
impl Geometry
[src]
impl Geometry
pub fn new(value: Value) -> Self
[src]
pub fn new(value: Value) -> Self
Returns a new Geometry
with the specified value
. bbox
and foreign_members
will be
set to None
.
Trait Implementations
impl From<Geometry> for GeoJson
[src]
impl From<Geometry> for GeoJson
impl Clone for Geometry
[src]
impl Clone for Geometry
fn clone(&self) -> Geometry
[src]
fn clone(&self) -> Geometry
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Geometry
[src]
impl Debug for Geometry
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 Geometry
[src]
impl PartialEq for Geometry
fn eq(&self, other: &Geometry) -> bool
[src]
fn eq(&self, other: &Geometry) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Geometry) -> bool
[src]
fn ne(&self, other: &Geometry) -> bool
This method tests for !=
.
impl<'a> From<&'a Geometry> for Map<String, JsonValue>
[src]
impl<'a> From<&'a Geometry> for Map<String, JsonValue>
impl Serialize for Geometry
[src]
impl Serialize for Geometry
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<'de> Deserialize<'de> for Geometry
[src]
impl<'de> Deserialize<'de> for Geometry
fn deserialize<D>(deserializer: D) -> Result<Geometry, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Geometry, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more