[−][src]Struct mapbox_vector_tile::Feature
A single feature. It has a geometry and some properties (i.e. tags)
Fields
geometry: Geometry<i32>
The geomtry
properties: Rc<Properties>
The properties. Uses an Rc
because properties can be shared between tiles.
Methods
impl Feature
[src]
pub fn new(geometry: Geometry<i32>, properties: Rc<Properties>) -> Self
[src]
Create a Feature with this geometry
and these properties
pub fn from_geometry(geometry: Geometry<i32>) -> Self
[src]
Create a feature (with no propertes) from this geometry.
pub fn get_point<'a>(&'a self) -> Option<Point<i32>>
[src]
pub fn translate_geometry(
&mut self,
x_func: &dyn Fn(i32) -> i32,
y_func: &dyn Fn(i32) -> i32
)
[src]
&mut self,
x_func: &dyn Fn(i32) -> i32,
y_func: &dyn Fn(i32) -> i32
)
pub fn set<K: Into<Rc<String>>, V: Into<Value>>(self, k: K, v: V) -> Self
[src]
Sets a property for this feature. It will panic if the properties are shared with other features. Don't call this if that could happen. Consumes the feature and returns it. Useful for Building pattern
Trait Implementations
impl PartialEq<Feature> for Feature
[src]
impl From<Geometry<i32>> for Feature
[src]
Convert a geometry to a feature.
impl Clone for Feature
[src]
fn clone(&self) -> Feature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Feature
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,