pub struct MutableRectArray {
pub values: Vec<f64>,
pub validity: NullBufferBuilder,
}
Fields§
§values: Vec<f64>
A Buffer of float values for the bounding rectangles Invariant: the length of values must always be a multiple of 4
validity: NullBufferBuilder
Implementations§
Source§impl MutableRectArray
impl MutableRectArray
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty MutableRectArray
.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new MutableRectArray
with a capacity.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional
more points to be inserted
in the given Vec<T>
. The collection may reserve more space to
speculatively avoid frequent reallocations. After calling reserve
,
capacity will be greater than or equal to self.len() + additional
.
Does nothing if capacity is already sufficient.
Sourcepub fn try_new(
values: Vec<f64>,
validity: NullBufferBuilder,
) -> Result<Self, GeoArrowError>
pub fn try_new( values: Vec<f64>, validity: NullBufferBuilder, ) -> Result<Self, GeoArrowError>
The canonical method to create a MutableRectArray
out of its internal components.
§Implementation
This function is O(1)
.
§Errors
This function errors iff:
- The validity is not
None
and its length is different from the number of geometries
Sourcepub fn into_inner(self) -> (Vec<f64>, NullBufferBuilder)
pub fn into_inner(self) -> (Vec<f64>, NullBufferBuilder)
Extract the low-level APIs from the MutableRectArray
.
Sourcepub fn push_rect(&mut self, value: Option<&impl RectTrait<T = f64>>)
pub fn push_rect(&mut self, value: Option<&impl RectTrait<T = f64>>)
Add a new point to the end of this array.
pub fn into_arrow_ref(self) -> Arc<dyn Array>
Trait Implementations§
Source§impl Debug for MutableRectArray
impl Debug for MutableRectArray
Source§impl Default for MutableRectArray
impl Default for MutableRectArray
Source§impl From<MutableRectArray> for RectArray
impl From<MutableRectArray> for RectArray
Source§fn from(other: MutableRectArray) -> Self
fn from(other: MutableRectArray) -> Self
Converts to this type from the input type.
Source§impl IntoArrow for MutableRectArray
impl IntoArrow for MutableRectArray
type ArrowArray = FixedSizeListArray
fn into_arrow(self) -> Self::ArrowArray
Auto Trait Implementations§
impl Freeze for MutableRectArray
impl RefUnwindSafe for MutableRectArray
impl Send for MutableRectArray
impl Sync for MutableRectArray
impl Unpin for MutableRectArray
impl UnwindSafe for MutableRectArray
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more