pub trait ExtensionFunctions {
// Required method
fn call(
&self,
ns_uri: &str,
name: &str,
args: Vec<Value>,
) -> Option<Result<Value, XmlError>>;
}Expand description
Caller-supplied lookup for non-XSLT XPath functions.
Implement on your own type to integrate with an existing function
registry, or use the Extensions builder for per-call closure
registration.
Required Methods§
Sourcefn call(
&self,
ns_uri: &str,
name: &str,
args: Vec<Value>,
) -> Option<Result<Value, XmlError>>
fn call( &self, ns_uri: &str, name: &str, args: Vec<Value>, ) -> Option<Result<Value, XmlError>>
Try to invoke name in ns_uri with args. Return
Some(Ok(value)) on success, Some(Err(_)) to surface a
runtime error, or None if this implementation doesn’t
handle the call (the engine will continue its fallback
chain — native EXSLT, then “unknown function” error).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".