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

Foreign Members

[RFC7946 § 6] (https://tools.ietf.org/html/rfc7946#section-6)

Trait Implementations

impl From<FeatureCollection> for GeoJson
[src]

Performs the conversion.

impl Clone for FeatureCollection
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for FeatureCollection
[src]

Formats the value using the given formatter. Read more

impl PartialEq for FeatureCollection
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> From<&'a FeatureCollection> for Map<String, JsonValue>
[src]

Performs the conversion.

impl Serialize for FeatureCollection
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for FeatureCollection
[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations