pub struct PropertyFunctionRegistry { /* private fields */ }Expand description
Registry of property functions, keyed by predicate IRI.
Implementations§
Source§impl PropertyFunctionRegistry
impl PropertyFunctionRegistry
Sourcepub fn register(
&mut self,
iri: impl Into<String>,
func: Arc<dyn PropertyFunction>,
)
pub fn register( &mut self, iri: impl Into<String>, func: Arc<dyn PropertyFunction>, )
Register a property function instance for a given IRI.
Sourcepub fn register_factory(
&mut self,
iri: impl Into<String>,
factory: Arc<dyn PropertyFunctionFactory>,
)
pub fn register_factory( &mut self, iri: impl Into<String>, factory: Arc<dyn PropertyFunctionFactory>, )
Register a factory for lazy creation of property functions.
Sourcepub fn unregister(&mut self, iri: &str) -> bool
pub fn unregister(&mut self, iri: &str) -> bool
Unregister a property function.
Sourcepub fn is_property_function(&self, iri: &str) -> bool
pub fn is_property_function(&self, iri: &str) -> bool
Check if an IRI is registered as a property function.
Sourcepub fn lookup(&mut self, iri: &str) -> Option<Arc<dyn PropertyFunction>>
pub fn lookup(&mut self, iri: &str) -> Option<Arc<dyn PropertyFunction>>
Look up a property function by IRI.
Sourcepub fn evaluate(
&mut self,
iri: &str,
subject: &PropertyFunctionArg,
object: &PropertyFunctionArg,
) -> Result<PropertyFunctionResult, OxirsError>
pub fn evaluate( &mut self, iri: &str, subject: &PropertyFunctionArg, object: &PropertyFunctionArg, ) -> Result<PropertyFunctionResult, OxirsError>
Evaluate a property function by IRI.
Sourcepub fn registered_iris(&self) -> Vec<String>
pub fn registered_iris(&self) -> Vec<String>
Get all registered IRIs.
Sourcepub fn all_metadata(&self) -> Vec<PropertyFunctionMetadata>
pub fn all_metadata(&self) -> Vec<PropertyFunctionMetadata>
Get metadata for all registered property functions.
Sourcepub fn statistics(&self) -> &PropertyFunctionStats
pub fn statistics(&self) -> &PropertyFunctionStats
Get execution statistics.
Sourcepub fn reset_statistics(&mut self)
pub fn reset_statistics(&mut self)
Reset execution statistics.
Trait Implementations§
Source§impl Debug for PropertyFunctionRegistry
impl Debug for PropertyFunctionRegistry
Auto Trait Implementations§
impl Freeze for PropertyFunctionRegistry
impl !RefUnwindSafe for PropertyFunctionRegistry
impl Send for PropertyFunctionRegistry
impl Sync for PropertyFunctionRegistry
impl Unpin for PropertyFunctionRegistry
impl UnsafeUnpin for PropertyFunctionRegistry
impl !UnwindSafe for PropertyFunctionRegistry
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more