Struct geojson::FeatureCollection [−][src]
pub struct FeatureCollection {
pub bbox: Option<Bbox>,
pub features: Vec<Feature>,
pub foreign_members: Option<Map<String, JsonValue>>,
}Feature Collection Objects
[GeoJSON Format Specification § 3.3] (https://tools.ietf.org/html/rfc7946#section-3.3)
Examples
Serialization:
use geojson::FeatureCollection; use geojson::GeoJson; let feature_collection = FeatureCollection { bbox: None, features: vec![], foreign_members: None, }; let serialized = GeoJson::from(feature_collection).to_string(); assert_eq!( serialized, "{\"features\":[],\"type\":\"FeatureCollection\"}" );
Fields
bbox: Option<Bbox>
features: Vec<Feature>
foreign_members: Option<Map<String, JsonValue>>
Foreign Members
[RFC7946 § 6] (https://tools.ietf.org/html/rfc7946#section-6)
Trait Implementations
impl From<FeatureCollection> for GeoJson[src]
impl From<FeatureCollection> for GeoJsonfn from(feature_collection: FeatureCollection) -> GeoJson[src]
fn from(feature_collection: FeatureCollection) -> GeoJsonPerforms the conversion.
impl Clone for FeatureCollection[src]
impl Clone for FeatureCollectionfn clone(&self) -> FeatureCollection[src]
fn clone(&self) -> FeatureCollectionReturns 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 FeatureCollection[src]
impl Debug for FeatureCollectionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for FeatureCollection[src]
impl PartialEq for FeatureCollectionfn eq(&self, other: &FeatureCollection) -> bool[src]
fn eq(&self, other: &FeatureCollection) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FeatureCollection) -> bool[src]
fn ne(&self, other: &FeatureCollection) -> boolThis method tests for !=.
impl<'a> From<&'a FeatureCollection> for Map<String, JsonValue>[src]
impl<'a> From<&'a FeatureCollection> for Map<String, JsonValue>impl Serialize for FeatureCollection[src]
impl Serialize for FeatureCollectionfn 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 FeatureCollection[src]
impl<'de> Deserialize<'de> for FeatureCollectionfn deserialize<D>(deserializer: D) -> Result<FeatureCollection, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<FeatureCollection, D::Error> where
D: Deserializer<'de>, Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl Send for FeatureCollection
impl Send for FeatureCollectionimpl Sync for FeatureCollection
impl Sync for FeatureCollection