pub struct Feature {
pub geometry: Geometry<i32>,
pub properties: Rc<Properties>,
}Expand description
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.
Implementations§
Source§impl Feature
impl Feature
Sourcepub fn new(geometry: Geometry<i32>, properties: Rc<Properties>) -> Self
pub fn new(geometry: Geometry<i32>, properties: Rc<Properties>) -> Self
Create a Feature with this geometry and these properties
Sourcepub fn from_geometry(geometry: Geometry<i32>) -> Self
pub fn from_geometry(geometry: Geometry<i32>) -> Self
Create a feature (with no propertes) from this geometry.
pub fn get_point<'a>(&'a self) -> Option<Point<i32>>
pub fn translate_geometry( &mut self, x_func: &dyn Fn(i32) -> i32, y_func: &dyn Fn(i32) -> i32, )
Trait Implementations§
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl !Send for Feature
impl !Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
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