pub struct MultiPointCapacity { /* private fields */ }
Expand description
A counter for the buffer sizes of a MultiPointArray
.
This can be used to reduce allocations by allocating once for exactly the array size you need.
Implementations§
Source§impl MultiPointCapacity
impl MultiPointCapacity
Sourcepub fn new(coord_capacity: usize, geom_capacity: usize) -> Self
pub fn new(coord_capacity: usize, geom_capacity: usize) -> Self
Create a new capacity with known sizes.
Sourcepub fn add_point(&mut self, point: Option<&impl PointTrait>)
pub fn add_point(&mut self, point: Option<&impl PointTrait>)
Add the capacity of a point
Sourcepub fn add_multi_point(
&mut self,
maybe_multi_point: Option<&impl MultiPointTrait>,
)
pub fn add_multi_point( &mut self, maybe_multi_point: Option<&impl MultiPointTrait>, )
Add the capacity of the given MultiPoint
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 Point or MultiPoint
Sourcepub fn coord_capacity(&self) -> usize
pub fn coord_capacity(&self) -> usize
The coordinate buffer capacity
Sourcepub fn geom_capacity(&self) -> usize
pub fn geom_capacity(&self) -> usize
The geometry offsets buffer capacity
Sourcepub fn from_multi_points<'a>(
geoms: impl Iterator<Item = Option<&'a (impl MultiPointTrait + 'a)>>,
) -> Self
pub fn from_multi_points<'a>( geoms: impl Iterator<Item = Option<&'a (impl MultiPointTrait + 'a)>>, ) -> Self
Construct a new counter pre-filled with the given MultiPoints
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 MultiPointCapacity
impl Add for MultiPointCapacity
Source§impl AddAssign for MultiPointCapacity
impl AddAssign for MultiPointCapacity
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Clone for MultiPointCapacity
impl Clone for MultiPointCapacity
Source§fn clone(&self) -> MultiPointCapacity
fn clone(&self) -> MultiPointCapacity
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 MultiPointCapacity
impl Debug for MultiPointCapacity
Source§impl Default for MultiPointCapacity
impl Default for MultiPointCapacity
impl Copy for MultiPointCapacity
Auto Trait Implementations§
impl Freeze for MultiPointCapacity
impl RefUnwindSafe for MultiPointCapacity
impl Send for MultiPointCapacity
impl Sync for MultiPointCapacity
impl Unpin for MultiPointCapacity
impl UnwindSafe for MultiPointCapacity
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