pub struct GeometryCollectionCapacity { /* private fields */ }
Expand description
A counter for the buffer sizes of a
GeometryCollectionArray
.
This can be used to reduce allocations by allocating once for exactly the array size you need.
Implementations§
Source§impl GeometryCollectionCapacity
impl GeometryCollectionCapacity
Sourcepub fn new(mixed_capacity: MixedCapacity, geom_capacity: usize) -> Self
pub fn new(mixed_capacity: MixedCapacity, geom_capacity: usize) -> Self
Create a new capacity with known sizes.
Sourcepub fn geom_capacity(&self) -> usize
pub fn geom_capacity(&self) -> usize
The geometry offset buffer capacity
Sourcepub fn add_geometry<T: WktNum>(
&mut self,
geom: Option<&impl GeometryTrait<T = T>>,
) -> GeoArrowResult<()>
pub fn add_geometry<T: WktNum>( &mut self, geom: Option<&impl GeometryTrait<T = T>>, ) -> GeoArrowResult<()>
Add a Geometry to this capacity counter.
Sourcepub fn add_geometry_collection<'a, T: WktNum>(
&mut self,
geom: Option<&'a (impl GeometryCollectionTrait<T = T> + 'a)>,
) -> GeoArrowResult<()>
pub fn add_geometry_collection<'a, T: WktNum>( &mut self, geom: Option<&'a (impl GeometryCollectionTrait<T = T> + 'a)>, ) -> GeoArrowResult<()>
Add a GeometryCollection to this capacity counter.
Sourcepub fn from_geometry_collections<'a, T: WktNum>(
geoms: impl Iterator<Item = Option<&'a (impl GeometryCollectionTrait<T = T> + 'a)>>,
) -> GeoArrowResult<Self>
pub fn from_geometry_collections<'a, T: WktNum>( geoms: impl Iterator<Item = Option<&'a (impl GeometryCollectionTrait<T = T> + 'a)>>, ) -> GeoArrowResult<Self>
Create a capacity counter from an iterator of GeometryCollections.
Sourcepub fn from_geometries<'a, T: WktNum>(
geoms: impl Iterator<Item = Option<&'a (impl GeometryTrait<T = T> + 'a)>>,
) -> GeoArrowResult<Self>
pub fn from_geometries<'a, T: WktNum>( geoms: impl Iterator<Item = Option<&'a (impl GeometryTrait<T = T> + 'a)>>, ) -> GeoArrowResult<Self>
Create a capacity counter from an iterator of Geometries.
Trait Implementations§
Source§impl Add for GeometryCollectionCapacity
impl Add for GeometryCollectionCapacity
Source§impl Clone for GeometryCollectionCapacity
impl Clone for GeometryCollectionCapacity
Source§fn clone(&self) -> GeometryCollectionCapacity
fn clone(&self) -> GeometryCollectionCapacity
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 GeometryCollectionCapacity
impl Debug for GeometryCollectionCapacity
Source§impl Default for GeometryCollectionCapacity
impl Default for GeometryCollectionCapacity
impl Copy for GeometryCollectionCapacity
Auto Trait Implementations§
impl Freeze for GeometryCollectionCapacity
impl RefUnwindSafe for GeometryCollectionCapacity
impl Send for GeometryCollectionCapacity
impl Sync for GeometryCollectionCapacity
impl Unpin for GeometryCollectionCapacity
impl UnwindSafe for GeometryCollectionCapacity
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