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.
ToGisJSON::to_gis_json: Converts an input into aJSONCollectionToGisJSON::to_feature_collection: Converts an input into aFeatureCollectionToGisJSON::to_s2_feature_collection: Converts an input into aS2FeatureCollectionToGisJSON::to_feature: Converts an input into aFeatureToGisJSON::to_vector_feature: Converts an input into aVectorFeatureToGisJSON::to_features: Converts an input into aFeatures
Required Methods§
Sourcefn to_gis_json<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
&self,
) -> Result<JSONCollection<M, P, D>, ToGISJSONError>
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
Sourcefn to_feature_collection<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
&self,
) -> Result<FeatureCollection<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>
Converts a String to a FeatureCollection
Sourcefn to_s2_feature_collection<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
&self,
) -> Result<S2FeatureCollection<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>
Converts a String to a FeatureCollection
Sourcefn to_feature<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
&self,
) -> Result<Feature<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>
Converts a String to a Feature
Sourcefn to_vector_feature<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
&self,
) -> Result<VectorFeature<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>
Converts a String to a VectorFeature
Sourcefn to_features<M: Clone + DeserializeOwned, P: Clone + Default + DeserializeOwned, D: Clone + Default + DeserializeOwned>(
&self,
) -> Result<Features<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>
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.