pub struct FunctionRegistry { /* private fields */ }Expand description
Registry of all built-in XPath functions.
Provides lookup by namespace, local name, and arity.
Implementations§
Source§impl FunctionRegistry
impl FunctionRegistry
Sourcepub fn register(&mut self, entry: FunctionEntry)
pub fn register(&mut self, entry: FunctionEntry)
Register a function entry
Sourcepub fn lookup(
&self,
namespace: &str,
local_name: &str,
arity: usize,
) -> Option<&FunctionEntry>
pub fn lookup( &self, namespace: &str, local_name: &str, arity: usize, ) -> Option<&FunctionEntry>
Look up a function by namespace, local name, and arity.
Also handles the XPath 2010 namespace alias.
Sourcepub fn by_id(&self, id: FunctionId) -> Option<&FunctionEntry>
pub fn by_id(&self, id: FunctionId) -> Option<&FunctionEntry>
Get an entry by its FunctionId.
Sourcepub fn by_id_value(&self, value: u16) -> Option<&FunctionEntry>
pub fn by_id_value(&self, value: u16) -> Option<&FunctionEntry>
Get an entry by its FunctionId discriminant value.
This is used internally for converting FunctionHandle back to FunctionId.
Sourcepub fn entries(&self) -> &[FunctionEntry]
pub fn entries(&self) -> &[FunctionEntry]
Get a slice of all registered entries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FunctionRegistry
impl RefUnwindSafe for FunctionRegistry
impl Send for FunctionRegistry
impl Sync for FunctionRegistry
impl Unpin for FunctionRegistry
impl UnsafeUnpin for FunctionRegistry
impl UnwindSafe for FunctionRegistry
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