pub trait IterGeo {
// Required method
fn iter_as_wkb_bytes<'a, F: FnMut(Option<&'a [u8]>) -> Result<()>>(
&'a self,
sedona_type: &SedonaType,
num_iterations: usize,
func: F,
) -> Result<()>;
// Provided methods
fn iter_with_factory<'a, Factory: GeometryFactory, F: FnMut(Option<Factory::Geom<'a>>) -> Result<()>>(
&'a self,
factory: &Factory,
sedona_type: &SedonaType,
num_iterations: usize,
func: F,
) -> Result<()> { ... }
fn iter_as_wkb<'a, F: FnMut(Option<Wkb<'a>>) -> Result<()>>(
&'a self,
sedona_type: &SedonaType,
num_iterations: usize,
func: F,
) -> Result<()> { ... }
}Expand description
Trait for iterating over a container type as geometry scalars
Currently the only scalar type supported is Wkb; however, for future geometry array types it may make sense to offer other scalar types over which to iterate.
Required Methods§
fn iter_as_wkb_bytes<'a, F: FnMut(Option<&'a [u8]>) -> Result<()>>( &'a self, sedona_type: &SedonaType, num_iterations: usize, func: F, ) -> Result<()>
Provided Methods§
fn iter_with_factory<'a, Factory: GeometryFactory, F: FnMut(Option<Factory::Geom<'a>>) -> Result<()>>( &'a self, factory: &Factory, sedona_type: &SedonaType, num_iterations: usize, func: F, ) -> Result<()>
Sourcefn iter_as_wkb<'a, F: FnMut(Option<Wkb<'a>>) -> Result<()>>(
&'a self,
sedona_type: &SedonaType,
num_iterations: usize,
func: F,
) -> Result<()>
fn iter_as_wkb<'a, F: FnMut(Option<Wkb<'a>>) -> Result<()>>( &'a self, sedona_type: &SedonaType, num_iterations: usize, func: F, ) -> Result<()>
Apply a function for each element of self as an optional Wkb
The function will always be called num_iteration types to support efficient iteration over scalar containers (e.g., so that implementations can parse the Wkb once and reuse the object).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.