ToGisJSON

Trait ToGisJSON 

Source
pub trait ToGisJSON {
    // Required methods
    fn to_gis_json<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
        &self,
    ) -> Result<JSONCollection<M, P, D>, ToGISJSONError>;
    fn to_feature_collection<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
        &self,
    ) -> Result<FeatureCollection<M, P, D>, ToGISJSONError>;
    fn to_s2_feature_collection<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
        &self,
    ) -> Result<S2FeatureCollection<M, P, D>, ToGISJSONError>;
    fn to_feature<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
        &self,
    ) -> Result<Feature<M, P, D>, ToGISJSONError>;
    fn to_vector_feature<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
        &self,
    ) -> Result<VectorFeature<M, P, D>, ToGISJSONError>;
    fn to_features<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
        &self,
    ) -> Result<Features<M, P, D>, ToGISJSONError>;
}
Expand description

§Convert strings to (Geo|S2)JSON

§Description

Converts a String or &str to a JSONCollection, FeatureCollection or Feature. Supports S2 and WGS84 JSON

§Usage

This trait allows for a lot of flexibility in how you can parse your data.

Required Methods§

Source

fn to_gis_json<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>( &self, ) -> Result<JSONCollection<M, P, D>, ToGISJSONError>

Converts a String to a JSONCollection. Supports S2 and WGS84 JSON

Source

fn to_feature_collection<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>( &self, ) -> Result<FeatureCollection<M, P, D>, ToGISJSONError>

Converts a String to a FeatureCollection

Source

fn to_s2_feature_collection<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>( &self, ) -> Result<S2FeatureCollection<M, P, D>, ToGISJSONError>

Converts a String to a FeatureCollection

Source

fn to_feature<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>( &self, ) -> Result<Feature<M, P, D>, ToGISJSONError>

Converts a String to a Feature

Source

fn to_vector_feature<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>( &self, ) -> Result<VectorFeature<M, P, D>, ToGISJSONError>

Converts a String to a VectorFeature

Source

fn to_features<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>( &self, ) -> Result<Features<M, P, D>, ToGISJSONError>

Converts a String to a WMFeature

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToGisJSON for &str

Implementors§