pub struct FunctionRegistry { /* private fields */ }Expand description
The host functions of a store, by IRI.
Implementations§
Source§impl FunctionRegistry
impl FunctionRegistry
pub fn new() -> FunctionRegistry
Sourcepub fn register(&mut self, function: HostFunction) -> Result<(), Error>
pub fn register(&mut self, function: HostFunction) -> Result<(), Error>
Adds a function, replacing one with the same IRI. Fails on an invalid or reserved IRI, and on a Cypher name another function already uses.
Sourcepub fn unregister(&mut self, iri: &str) -> bool
pub fn unregister(&mut self, iri: &str) -> bool
Removes a function; false when none has this IRI.
pub fn get(&self, iri: &str) -> Option<&HostFunction>
Sourcepub fn by_cypher_name(&self, name: &str) -> Option<&HostFunction>
pub fn by_cypher_name(&self, name: &str) -> Option<&HostFunction>
The function Cypher calls name (case-insensitive).
pub fn iter(&self) -> impl Iterator<Item = &HostFunction>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn install(&self, evaluator: QueryEvaluator) -> QueryEvaluator
pub fn install(&self, evaluator: QueryEvaluator) -> QueryEvaluator
Adds every function to a spareval evaluator.
Trait Implementations§
Source§impl Clone for FunctionRegistry
impl Clone for FunctionRegistry
Source§fn clone(&self) -> FunctionRegistry
fn clone(&self) -> FunctionRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionRegistry
impl Debug for FunctionRegistry
Source§impl Default for FunctionRegistry
impl Default for FunctionRegistry
Source§fn default() -> FunctionRegistry
fn default() -> FunctionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for FunctionRegistry
impl !UnwindSafe for FunctionRegistry
impl Freeze for FunctionRegistry
impl Send for FunctionRegistry
impl Sync for FunctionRegistry
impl Unpin for FunctionRegistry
impl UnsafeUnpin 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