pub struct Registry { /* private fields */ }Available on crate feature
parse only.Expand description
Extension Registry that manages Substrait extensions
This registry is immutable and reusable across multiple plans. It provides URN + name based lookup for extension types. Function parsing will be added in a future update.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn new<I: IntoIterator<Item = ExtensionFile>>(
extensions: I,
) -> Result<Self, SimpleExtensionsError>
pub fn new<I: IntoIterator<Item = ExtensionFile>>( extensions: I, ) -> Result<Self, SimpleExtensionsError>
Create a new Global Registry from validated extension files.
Any duplicate URNs will raise an error.
Sourcepub fn extensions(&self) -> impl Iterator<Item = (&Urn, &SimpleExtensions)>
pub fn extensions(&self) -> impl Iterator<Item = (&Urn, &SimpleExtensions)>
Get an iterator over all extension files in this registry
Sourcepub fn from_core_extensions() -> Self
Available on crate feature extensions only.
pub fn from_core_extensions() -> Self
extensions only.Create a Global Registry from the built-in core extensions.
Sourcepub fn get_type(&self, urn: &Urn, name: &str) -> Option<&CustomType>
pub fn get_type(&self, urn: &Urn, name: &str) -> Option<&CustomType>
Get a type by URN and name
Sourcepub fn get_scalar_function(
&self,
urn: &Urn,
name: &str,
) -> Option<&ScalarFunction>
pub fn get_scalar_function( &self, urn: &Urn, name: &str, ) -> Option<&ScalarFunction>
Get a scalar function by URN and name.
TODO: Add support for retrieving functions by their full signature shorthand (e.g., “add:i32_i32”).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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