Struct geojson::Feature [−][src]
Feature Objects
Fields
bbox: Option<Bbox>
Bounding Box
geometry: Option<Geometry>
Geometry
id: Option<Id>
Identifier
properties: Option<Map<String, JsonValue>>
Properties
foreign_members: Option<Map<String, JsonValue>>
Foreign Members
Implementations
impl Feature
[src]
pub fn from_json_object(object: Map<String, JsonValue>) -> Result<Self, Error>
[src]
pub fn from_json_value(value: JsonValue) -> Result<Self, Error>
[src]
pub fn property(&self, key: impl AsRef<str>) -> Option<&JsonValue>
[src]
Return the value of this property, if it's set
pub fn contains_property(&self, key: impl AsRef<str>) -> bool
[src]
Return true iff this key is set
pub fn set_property(
&mut self,
key: impl Into<String>,
value: impl Into<JsonValue>
)
[src]
&mut self,
key: impl Into<String>,
value: impl Into<JsonValue>
)
Set a property to this value, overwriting any possible older value
pub fn remove_property(&mut self, key: impl AsRef<str>) -> Option<JsonValue>
[src]
Removes a key from the properties
map, returning the value at the key if the key
was previously in the properties
map.
pub fn len_properties(&self) -> usize
[src]
The number of properties
pub fn properties_iter(
&self
) -> Box<dyn ExactSizeIterator<Item = (&String, &JsonValue)>>
[src]
&self
) -> Box<dyn ExactSizeIterator<Item = (&String, &JsonValue)>>
Returns an iterator over all the properties
Trait Implementations
impl Clone for Feature
[src]
impl Debug for Feature
[src]
impl<'de> Deserialize<'de> for Feature
[src]
fn deserialize<D>(deserializer: D) -> Result<Feature, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Feature
[src]
impl<'a> From<&'a Feature> for Map<String, JsonValue>
[src]
impl From<Feature> for GeoJson
[src]
impl PartialEq<Feature> for Feature
[src]
impl Serialize for Feature
[src]
impl StructuralPartialEq for Feature
[src]
impl TryFrom<GeoJson> for Feature
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: GeoJson) -> Result<Self, Self::Error>
[src]
impl TryFrom<Map<String, Value>> for Feature
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(mut object: Map<String, JsonValue>) -> Result<Self, Error>
[src]
impl TryFrom<Value> for Feature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Feature
[src]
impl Send for Feature
[src]
impl Sync for Feature
[src]
impl Unpin for Feature
[src]
impl UnwindSafe for Feature
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,