pub struct VectorFeature<M = ()> {
pub _type: String,
pub id: Option<u64>,
pub face: Face,
pub properties: Properties,
pub geometry: VectorGeometry,
pub metadata: Option<M>,
}
Expand description
Component to build an WM or S2 Vector Feature
Fields§
§_type: String
Type will always be “VectorFeature”
id: Option<u64>
Unique identifier
face: Face
Face of the feature
properties: Properties
Properties of the feature
geometry: VectorGeometry
Geometry of the feature
metadata: Option<M>
Metadata of the feature
Implementations§
Source§impl<M: Clone> VectorFeature<M>
impl<M: Clone> VectorFeature<M>
Source§impl<M: Clone> VectorFeature<M>
impl<M: Clone> VectorFeature<M>
Source§impl<M> VectorFeature<M>
impl<M> VectorFeature<M>
Sourcepub fn new_wm(
id: Option<u64>,
properties: Properties,
geometry: VectorGeometry,
metadata: Option<M>,
) -> Self
pub fn new_wm( id: Option<u64>, properties: Properties, geometry: VectorGeometry, metadata: Option<M>, ) -> Self
Create a new VectorFeature in the WM format
Sourcepub fn new_s2(
id: Option<u64>,
face: Face,
properties: Properties,
geometry: VectorGeometry,
metadata: Option<M>,
) -> Self
pub fn new_s2( id: Option<u64>, face: Face, properties: Properties, geometry: VectorGeometry, metadata: Option<M>, ) -> Self
Create a new VectorFeature in the WM format
Sourcepub fn from_vector_feature(
feature: &VectorFeature<M>,
geometry: Option<VectorGeometry>,
) -> Selfwhere
M: Clone,
pub fn from_vector_feature(
feature: &VectorFeature<M>,
geometry: Option<VectorGeometry>,
) -> Selfwhere
M: Clone,
Create a new VectorFeature using an input VectorFeature. Assign new geometry if provided
Trait Implementations§
Source§impl<M: Clone> Clone for VectorFeature<M>
impl<M: Clone> Clone for VectorFeature<M>
Source§fn clone(&self) -> VectorFeature<M>
fn clone(&self) -> VectorFeature<M>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<M: Debug> Debug for VectorFeature<M>
impl<M: Debug> Debug for VectorFeature<M>
Source§impl<'de, M> Deserialize<'de> for VectorFeature<M>where
M: Deserialize<'de>,
impl<'de, M> Deserialize<'de> for VectorFeature<M>where
M: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<M: PartialEq> PartialEq for VectorFeature<M>
impl<M: PartialEq> PartialEq for VectorFeature<M>
Source§impl<M> Serialize for VectorFeature<M>where
M: Serialize,
impl<M> Serialize for VectorFeature<M>where
M: Serialize,
impl<M> StructuralPartialEq for VectorFeature<M>
Auto Trait Implementations§
impl<M> Freeze for VectorFeature<M>where
M: Freeze,
impl<M> RefUnwindSafe for VectorFeature<M>where
M: RefUnwindSafe,
impl<M> Send for VectorFeature<M>where
M: Send,
impl<M> Sync for VectorFeature<M>where
M: Sync,
impl<M> Unpin for VectorFeature<M>where
M: Unpin,
impl<M> UnwindSafe for VectorFeature<M>where
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more