pub struct MultiLineStringCapacity { /* private fields */ }
Expand description
A counter for the buffer sizes of a
MultiLineStringArray
.
This can be used to reduce allocations by allocating once for exactly the array size you need.
Implementations§
Source§impl MultiLineStringCapacity
impl MultiLineStringCapacity
Sourcepub fn new(
coord_capacity: usize,
ring_capacity: usize,
geom_capacity: usize,
) -> Self
pub fn new( coord_capacity: usize, ring_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 geom_capacity(&self) -> usize
pub fn geom_capacity(&self) -> usize
The geometry offset buffer capacity
Sourcepub fn add_line_string(
&mut self,
maybe_line_string: Option<&impl LineStringTrait>,
)
pub fn add_line_string( &mut self, maybe_line_string: Option<&impl LineStringTrait>, )
Add the capacity of the given LineString
Sourcepub fn add_multi_line_string(
&mut self,
multi_line_string: Option<&impl MultiLineStringTrait>,
)
pub fn add_multi_line_string( &mut self, multi_line_string: Option<&impl MultiLineStringTrait>, )
Add the capacity of the given MultiLineString
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 LineString or MultiLineString
Sourcepub fn from_multi_line_strings<'a>(
geoms: impl Iterator<Item = Option<&'a (impl MultiLineStringTrait + 'a)>>,
) -> Self
pub fn from_multi_line_strings<'a>( geoms: impl Iterator<Item = Option<&'a (impl MultiLineStringTrait + 'a)>>, ) -> Self
Construct a new counter pre-filled with the given MultiLineStrings
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 MultiLineStringCapacity
impl Add for MultiLineStringCapacity
Source§impl AddAssign<LineStringCapacity> for MultiLineStringCapacity
impl AddAssign<LineStringCapacity> for MultiLineStringCapacity
Source§fn add_assign(&mut self, rhs: LineStringCapacity)
fn add_assign(&mut self, rhs: LineStringCapacity)
Performs the
+=
operation. Read moreSource§impl AddAssign for MultiLineStringCapacity
impl AddAssign for MultiLineStringCapacity
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Clone for MultiLineStringCapacity
impl Clone for MultiLineStringCapacity
Source§fn clone(&self) -> MultiLineStringCapacity
fn clone(&self) -> MultiLineStringCapacity
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 MultiLineStringCapacity
impl Debug for MultiLineStringCapacity
Source§impl Default for MultiLineStringCapacity
impl Default for MultiLineStringCapacity
impl Copy for MultiLineStringCapacity
Auto Trait Implementations§
impl Freeze for MultiLineStringCapacity
impl RefUnwindSafe for MultiLineStringCapacity
impl Send for MultiLineStringCapacity
impl Sync for MultiLineStringCapacity
impl Unpin for MultiLineStringCapacity
impl UnwindSafe for MultiLineStringCapacity
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