Struct geojson::FeatureCollection
source · pub struct FeatureCollection {
pub bbox: Option<Bbox>,
pub features: Vec<Feature>,
pub foreign_members: Option<Map<String, JsonValue>>,
}
Expand description
Feature Collection Objects
GeoJSON Format Specification § 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
Implementations
Trait Implementations
sourceimpl Clone for FeatureCollection
impl Clone for FeatureCollection
sourcefn clone(&self) -> FeatureCollection
fn clone(&self) -> FeatureCollection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FeatureCollection
impl Debug for FeatureCollection
sourceimpl<'de> Deserialize<'de> for FeatureCollection
impl<'de> Deserialize<'de> for FeatureCollection
sourcefn deserialize<D>(deserializer: D) -> Result<FeatureCollection, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<FeatureCollection, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<FeatureCollection> for GeoJson
impl From<FeatureCollection> for GeoJson
sourcefn from(feature_collection: FeatureCollection) -> GeoJson
fn from(feature_collection: FeatureCollection) -> GeoJson
Converts to this type from the input type.
sourceimpl PartialEq<FeatureCollection> for FeatureCollection
impl PartialEq<FeatureCollection> for FeatureCollection
sourcefn eq(&self, other: &FeatureCollection) -> bool
fn eq(&self, other: &FeatureCollection) -> bool
sourceimpl Serialize for FeatureCollection
impl Serialize for FeatureCollection
impl StructuralPartialEq for FeatureCollection
Auto Trait Implementations
impl RefUnwindSafe for FeatureCollection
impl Send for FeatureCollection
impl Sync for FeatureCollection
impl Unpin for FeatureCollection
impl UnwindSafe for FeatureCollection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more