pub struct Extensions { /* private fields */ }Expand description
Ergonomic builder for the common case of registering a handful of
closure-based extension functions keyed by (namespace, name).
Lookups are O(1) and don’t allocate per call (the &str argument is
matched directly against the stored String keys via Borrow).
Implementations§
Source§impl Extensions
impl Extensions
Trait Implementations§
Source§impl Debug for Extensions
impl Debug for Extensions
Source§impl Default for Extensions
impl Default for Extensions
Source§fn default() -> Extensions
fn default() -> Extensions
Returns the “default value” for a type. Read more
Source§impl ExtensionFunctions for Extensions
impl ExtensionFunctions for Extensions
Source§fn call(
&self,
ns_uri: &str,
name: &str,
args: Vec<XPathValue>,
) -> Option<Result<XPathValue, XmlError>>
fn call( &self, ns_uri: &str, name: &str, args: Vec<XPathValue>, ) -> Option<Result<XPathValue, 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).Auto Trait Implementations§
impl !RefUnwindSafe for Extensions
impl !Send for Extensions
impl !Sync for Extensions
impl !UnwindSafe for Extensions
impl Freeze for Extensions
impl Unpin for Extensions
impl UnsafeUnpin for Extensions
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