pub struct MultiPolygonCapacity { /* private fields */ }
Expand description
A counter for the buffer sizes of a MultiPolygonArray
.
This can be used to reduce allocations by allocating once for exactly the array size you need.
Implementations§
Source§impl MultiPolygonCapacity
impl MultiPolygonCapacity
Sourcepub fn new(
coord_capacity: usize,
ring_capacity: usize,
polygon_capacity: usize,
geom_capacity: usize,
) -> Self
pub fn new( coord_capacity: usize, ring_capacity: usize, polygon_capacity: usize, geom_capacity: usize, ) -> Self
Create a new capacity with known sizes.
Sourcepub fn coord_capacity(&self) -> usize
pub fn coord_capacity(&self) -> usize
The coordinate buffer capacity
Sourcepub fn ring_capacity(&self) -> usize
pub fn ring_capacity(&self) -> usize
The ring offset buffer capacity
Sourcepub fn polygon_capacity(&self) -> usize
pub fn polygon_capacity(&self) -> usize
The polygon offset buffer capacity
Sourcepub fn geom_capacity(&self) -> usize
pub fn geom_capacity(&self) -> usize
The geometry offset buffer capacity
Sourcepub fn add_polygon<'a>(&mut self, polygon: Option<&'a (impl PolygonTrait + 'a)>)
pub fn add_polygon<'a>(&mut self, polygon: Option<&'a (impl PolygonTrait + 'a)>)
Add the capacity of the given Polygon
Sourcepub fn add_multi_polygon<'a>(
&mut self,
multi_polygon: Option<&'a (impl MultiPolygonTrait + 'a)>,
)
pub fn add_multi_polygon<'a>( &mut self, multi_polygon: Option<&'a (impl MultiPolygonTrait + 'a)>, )
Add the capacity of the given MultiPolygon
Sourcepub fn add_geometry(
&mut self,
value: Option<&impl GeometryTrait>,
) -> GeoArrowResult<()>
pub fn add_geometry( &mut self, value: Option<&impl GeometryTrait>, ) -> GeoArrowResult<()>
Add the capacity of the given Geometry
The type of the geometry must be either Polygon or MultiPolygon
Sourcepub fn from_multi_polygons<'a>(
geoms: impl Iterator<Item = Option<&'a (impl MultiPolygonTrait + 'a)>>,
) -> Self
pub fn from_multi_polygons<'a>( geoms: impl Iterator<Item = Option<&'a (impl MultiPolygonTrait + 'a)>>, ) -> Self
Construct a new counter pre-filled with the given MultiPolygons
Sourcepub fn from_geometries<'a>(
geoms: impl Iterator<Item = Option<&'a (impl GeometryTrait + 'a)>>,
) -> GeoArrowResult<Self>
pub fn from_geometries<'a>( geoms: impl Iterator<Item = Option<&'a (impl GeometryTrait + 'a)>>, ) -> GeoArrowResult<Self>
Construct a new counter pre-filled with the given geometries
Trait Implementations§
Source§impl Add for MultiPolygonCapacity
impl Add for MultiPolygonCapacity
Source§impl AddAssign<PolygonCapacity> for MultiPolygonCapacity
impl AddAssign<PolygonCapacity> for MultiPolygonCapacity
Source§fn add_assign(&mut self, rhs: PolygonCapacity)
fn add_assign(&mut self, rhs: PolygonCapacity)
Performs the
+=
operation. Read moreSource§impl AddAssign for MultiPolygonCapacity
impl AddAssign for MultiPolygonCapacity
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Clone for MultiPolygonCapacity
impl Clone for MultiPolygonCapacity
Source§fn clone(&self) -> MultiPolygonCapacity
fn clone(&self) -> MultiPolygonCapacity
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 Debug for MultiPolygonCapacity
impl Debug for MultiPolygonCapacity
Source§impl Default for MultiPolygonCapacity
impl Default for MultiPolygonCapacity
impl Copy for MultiPolygonCapacity
Auto Trait Implementations§
impl Freeze for MultiPolygonCapacity
impl RefUnwindSafe for MultiPolygonCapacity
impl Send for MultiPolygonCapacity
impl Sync for MultiPolygonCapacity
impl Unpin for MultiPolygonCapacity
impl UnwindSafe for MultiPolygonCapacity
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