pub struct ExtensionAnchors { /* private fields */ }Available on crate feature
parse only.Expand description
Tracks the known anchors for simple extensions, as needed for parsing a Substrait protobuf.
At the moment, this only tracks simple extension URNs by anchor, as further parsing of simple extensions, or the protobuf plan itself, is not supported yet.
Implementations§
Source§impl ExtensionAnchors
impl ExtensionAnchors
Sourcepub fn add_simple_extension_urn(
&mut self,
simple_extension_urn: &SimpleExtensionUrn,
) -> Result<(), ContextError>
pub fn add_simple_extension_urn( &mut self, simple_extension_urn: &SimpleExtensionUrn, ) -> Result<(), ContextError>
Register a SimpleExtensionUrn with this registry, rejecting duplicate anchors.
Sourcepub fn get_simple_extension_urn(
&self,
anchor: &Typed<u32, SimpleExtensionUrn>,
) -> Option<&Urn>
pub fn get_simple_extension_urn( &self, anchor: &Typed<u32, SimpleExtensionUrn>, ) -> Option<&Urn>
Look up the Urn for a previously registered anchor. Returns an error if the anchor has not been seen.
Trait Implementations§
Source§impl Default for ExtensionAnchors
impl Default for ExtensionAnchors
Source§fn default() -> ExtensionAnchors
fn default() -> ExtensionAnchors
Returns the “default value” for a type. Read more