pub struct WkbBuilder<O: OffsetSizeTrait>(/* private fields */);
Expand description
The GeoArrow equivalent to Vec<Option<Wkb>>
: a mutable collection of Wkb buffers.
Converting a WkbBuilder
into a GenericWkbArray
is O(1)
.
Implementations§
Source§impl<O: OffsetSizeTrait> WkbBuilder<O>
impl<O: OffsetSizeTrait> WkbBuilder<O>
Sourcepub fn new(typ: WkbType) -> Self
pub fn new(typ: WkbType) -> Self
Creates a new empty WkbBuilder
.
Sourcepub fn with_capacity(typ: WkbType, capacity: WkbCapacity) -> Self
pub fn with_capacity(typ: WkbType, capacity: WkbCapacity) -> Self
Initializes a new WkbBuilder
with a pre-allocated capacity of slots and values.
Sourcepub fn push_geometry(&mut self, geom: Option<&impl GeometryTrait<T = f64>>)
pub fn push_geometry(&mut self, geom: Option<&impl GeometryTrait<T = f64>>)
Push a Geometry onto the end of this builder
Sourcepub fn extend_from_iter<'a>(
&mut self,
geoms: impl Iterator<Item = Option<&'a (impl GeometryTrait<T = f64> + 'a)>>,
)
pub fn extend_from_iter<'a>( &mut self, geoms: impl Iterator<Item = Option<&'a (impl GeometryTrait<T = f64> + 'a)>>, )
Extend this builder from an iterator of Geometries.
Sourcepub fn from_nullable_geometries(
geoms: &[Option<impl GeometryTrait<T = f64>>],
typ: WkbType,
) -> Self
pub fn from_nullable_geometries( geoms: &[Option<impl GeometryTrait<T = f64>>], typ: WkbType, ) -> Self
Create this builder from a slice of nullable Geometries.
Sourcepub fn finish(self) -> GenericWkbArray<O>
pub fn finish(self) -> GenericWkbArray<O>
Consume this builder and convert to a GenericWkbArray.
This is O(1)
.
Trait Implementations§
Auto Trait Implementations§
impl<O> Freeze for WkbBuilder<O>
impl<O> RefUnwindSafe for WkbBuilder<O>where
O: RefUnwindSafe,
impl<O> Send for WkbBuilder<O>
impl<O> Sync for WkbBuilder<O>
impl<O> Unpin for WkbBuilder<O>where
O: Unpin,
impl<O> UnwindSafe for WkbBuilder<O>where
O: UnwindSafe,
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