Struct geojson::FeatureCollection [] [src]

pub struct FeatureCollection {
    pub bbox: Option<Bbox>,
    pub crs: Option<Crs>,
    pub features: Vec<Feature>,
}

Feature Collection Objects

GeoJSON Format Specification § 2.3

Examples

Serialization:

use geojson::FeatureCollection;
use geojson::GeoJson;

let feature_collection = FeatureCollection {
    bbox: None,
    crs: None,
    features: vec![],
};

let serialized = GeoJson::from(feature_collection).to_string();

assert_eq!(
    serialized,
    "{\"features\":[],\"type\":\"FeatureCollection\"}"
);

Fields

Trait Implementations

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.

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 ToJson for FeatureCollection
[src]

Converts the value of self to an instance of JSON