pub trait FunctionCatalog: Debug {
// Required methods
fn lookup(
&self,
namespace: &str,
local_name: &str,
arity: usize,
) -> Option<FunctionHandle>;
fn get_signature(
&self,
handle: FunctionHandle,
) -> Option<DynamicFunctionSignature>;
}Expand description
Trait for bind-time function lookup.
Implementors provide function resolution by namespace, local name, and arity.
The returned FunctionHandle is stored in the AST for later evaluation.
Required Methods§
Sourcefn lookup(
&self,
namespace: &str,
local_name: &str,
arity: usize,
) -> Option<FunctionHandle>
fn lookup( &self, namespace: &str, local_name: &str, arity: usize, ) -> Option<FunctionHandle>
Look up a function by namespace URI, local name, and arity.
Returns Some(handle) if a matching function is found, None otherwise.
Sourcefn get_signature(
&self,
handle: FunctionHandle,
) -> Option<DynamicFunctionSignature>
fn get_signature( &self, handle: FunctionHandle, ) -> Option<DynamicFunctionSignature>
Get the signature for a function handle.
Returns None if the handle is invalid.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".