pub struct MinimalFeature<const MAX_POINTS: usize> {
pub points: Vec<MinimalCoordinate, MAX_POINTS>,
pub feature_type: FeatureType,
}Expand description
Minimal vector feature (point, line, or polygon)
Fields§
§points: Vec<MinimalCoordinate, MAX_POINTS>Feature points
feature_type: FeatureTypeFeature type
Implementations§
Source§impl<const MAX_POINTS: usize> MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> MinimalFeature<MAX_POINTS>
Sourcepub const fn new(feature_type: FeatureType) -> Self
pub const fn new(feature_type: FeatureType) -> Self
Create a new feature
Sourcepub fn add_point(&mut self, point: MinimalCoordinate) -> Result<()>
pub fn add_point(&mut self, point: MinimalCoordinate) -> Result<()>
Add a point to the feature
Sourcepub fn bounds(&self) -> Option<MinimalBounds>
pub fn bounds(&self) -> Option<MinimalBounds>
Get bounding box
Trait Implementations§
Source§impl<const MAX_POINTS: usize> Clone for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> Clone for MinimalFeature<MAX_POINTS>
Source§fn clone(&self) -> MinimalFeature<MAX_POINTS>
fn clone(&self) -> MinimalFeature<MAX_POINTS>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<const MAX_POINTS: usize> Freeze for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> RefUnwindSafe for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> Send for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> Sync for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> Unpin for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> UnsafeUnpin for MinimalFeature<MAX_POINTS>
impl<const MAX_POINTS: usize> UnwindSafe for MinimalFeature<MAX_POINTS>
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