pub struct FunctionSet { /* private fields */ }Expand description
Helper for managing groups of functions
Sedona coordinates the assembly of a large number of spatial functions with potentially different sets of dependencies (e.g., geography vs. geometry), multiple implementations, and/or implementations that live in different crates. This structure helps coordinate these implementations.
Implementations§
Source§impl FunctionSet
impl FunctionSet
Sourcepub fn scalar_udfs(&self) -> impl Iterator<Item = &SedonaScalarUDF> + '_
pub fn scalar_udfs(&self) -> impl Iterator<Item = &SedonaScalarUDF> + '_
Iterate over references to all SedonaScalarUDFs
Sourcepub fn scalar_udf(&self, name: &str) -> Option<&SedonaScalarUDF>
pub fn scalar_udf(&self, name: &str) -> Option<&SedonaScalarUDF>
Return a reference to the function corresponding to the name
Sourcepub fn scalar_udf_mut(&mut self, name: &str) -> Option<&mut SedonaScalarUDF>
pub fn scalar_udf_mut(&mut self, name: &str) -> Option<&mut SedonaScalarUDF>
Return a mutable reference to the function corresponding to the name
Sourcepub fn insert_scalar_udf(
&mut self,
udf: SedonaScalarUDF,
) -> Option<SedonaScalarUDF>
pub fn insert_scalar_udf( &mut self, udf: SedonaScalarUDF, ) -> Option<SedonaScalarUDF>
Insert a new ScalarUDF and return the UDF that had previously been added, if any
Sourcepub fn aggregate_udfs(&self) -> impl Iterator<Item = &SedonaAggregateUDF> + '_
pub fn aggregate_udfs(&self) -> impl Iterator<Item = &SedonaAggregateUDF> + '_
Iterate over references to all SedonaAggregateUDFs
Sourcepub fn aggregate_udf(&self, name: &str) -> Option<&SedonaAggregateUDF>
pub fn aggregate_udf(&self, name: &str) -> Option<&SedonaAggregateUDF>
Return a reference to the aggregate function corresponding to the name
Sourcepub fn aggregate_udf_mut(
&mut self,
name: &str,
) -> Option<&mut SedonaAggregateUDF>
pub fn aggregate_udf_mut( &mut self, name: &str, ) -> Option<&mut SedonaAggregateUDF>
Return a mutable reference to the aggregate function corresponding to the name
Sourcepub fn insert_aggregate_udf(
&mut self,
udf: SedonaAggregateUDF,
) -> Option<SedonaAggregateUDF>
pub fn insert_aggregate_udf( &mut self, udf: SedonaAggregateUDF, ) -> Option<SedonaAggregateUDF>
Insert a new AggregateUDF and return the UDF that had previously been added, if any
Sourcepub fn merge(&mut self, other: FunctionSet)
pub fn merge(&mut self, other: FunctionSet)
Consume another function set and merge its contents into this one
Sourcepub fn add_scalar_udf_impl(
&mut self,
name: &str,
kernels: impl IntoScalarKernelRefs,
) -> Result<&SedonaScalarUDF>
pub fn add_scalar_udf_impl( &mut self, name: &str, kernels: impl IntoScalarKernelRefs, ) -> Result<&SedonaScalarUDF>
Add a kernel to a function in this set
This adds a scalar UDF with immutable output if a function of that name does not exist in this set. A reference to the matching or inserted function is returned.
Sourcepub fn add_aggregate_udf_kernel(
&mut self,
name: &str,
kernel: impl IntoSedonaAccumulatorRefs,
) -> Result<&SedonaAggregateUDF>
pub fn add_aggregate_udf_kernel( &mut self, name: &str, kernel: impl IntoSedonaAccumulatorRefs, ) -> Result<&SedonaAggregateUDF>
Add an aggregate kernel to a function in this set
This adds an aggregate UDF with immutable output if a function of that name does not exist in this set. A reference to the matching or inserted function is returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FunctionSet
impl !RefUnwindSafe for FunctionSet
impl Send for FunctionSet
impl Sync for FunctionSet
impl Unpin for FunctionSet
impl UnsafeUnpin for FunctionSet
impl !UnwindSafe for FunctionSet
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
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>
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>
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