pub struct FunctionRegistry { /* private fields */ }Expand description
Registry for managing function availability at runtime.
Implementations§
Source§impl FunctionRegistry
impl FunctionRegistry
Sourcepub fn new() -> FunctionRegistry
pub fn new() -> FunctionRegistry
Creates a new empty registry.
Sourcepub fn register_all(&mut self) -> &mut FunctionRegistry
pub fn register_all(&mut self) -> &mut FunctionRegistry
Registers all available functions.
Sourcepub fn register_category(&mut self, category: Category) -> &mut FunctionRegistry
pub fn register_category(&mut self, category: Category) -> &mut FunctionRegistry
Registers all functions in a category.
Sourcepub fn disable_function(&mut self, name: &str) -> &mut FunctionRegistry
pub fn disable_function(&mut self, name: &str) -> &mut FunctionRegistry
Disables a specific function (for ACLs).
Sourcepub fn enable_function(&mut self, name: &str) -> &mut FunctionRegistry
pub fn enable_function(&mut self, name: &str) -> &mut FunctionRegistry
Enables a previously disabled function.
Sourcepub fn is_enabled(&self, name: &str) -> bool
pub fn is_enabled(&self, name: &str) -> bool
Checks if a function is enabled.
Sourcepub fn get_function(&self, name: &str) -> Option<&FunctionInfo>
pub fn get_function(&self, name: &str) -> Option<&FunctionInfo>
Gets info about a specific function.
Sourcepub fn functions(&self) -> impl Iterator<Item = &FunctionInfo>
pub fn functions(&self) -> impl Iterator<Item = &FunctionInfo>
Iterates over all enabled functions.
Sourcepub fn functions_in_category(
&self,
category: Category,
) -> impl Iterator<Item = &FunctionInfo>
pub fn functions_in_category( &self, category: Category, ) -> impl Iterator<Item = &FunctionInfo>
Iterates over functions in a specific category.
Sourcepub fn categories(&self) -> impl Iterator<Item = &Category>
pub fn categories(&self) -> impl Iterator<Item = &Category>
Gets all registered categories.
Sourcepub fn functions_with_feature(
&self,
feature: Feature,
) -> impl Iterator<Item = &FunctionInfo>
pub fn functions_with_feature( &self, feature: Feature, ) -> impl Iterator<Item = &FunctionInfo>
Iterates over functions with a specific feature tag.
Sourcepub fn spec_function_names(&self) -> impl Iterator<Item = &'static str>
pub fn spec_function_names(&self) -> impl Iterator<Item = &'static str>
Gets all spec-only (standard JMESPath) function names.
Sourcepub fn is_spec_function(&self, name: &str) -> bool
pub fn is_spec_function(&self, name: &str) -> bool
Checks if a function is a standard JMESPath spec function.
Sourcepub fn get_function_by_name_or_alias(&self, name: &str) -> Option<&FunctionInfo>
pub fn get_function_by_name_or_alias(&self, name: &str) -> Option<&FunctionInfo>
Gets function info by name or alias.
Sourcepub fn all_aliases(&self) -> impl Iterator<Item = (&'static str, &'static str)>
pub fn all_aliases(&self) -> impl Iterator<Item = (&'static str, &'static str)>
Gets all aliases as (alias, canonical_name) pairs.
Sourcepub fn apply(&self, runtime: &mut Runtime)
pub fn apply(&self, runtime: &mut Runtime)
Applies the registry to a runtime, registering extension functions.
This calls each category’s register_filtered function to add
enabled extension functions to the runtime. Standard functions
are registered separately via runtime.register_builtin_functions().
Trait Implementations§
Source§impl Clone for FunctionRegistry
impl Clone for FunctionRegistry
Source§fn clone(&self) -> FunctionRegistry
fn clone(&self) -> FunctionRegistry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Auto Trait Implementations§
impl Freeze for FunctionRegistry
impl RefUnwindSafe for FunctionRegistry
impl Send for FunctionRegistry
impl Sync for FunctionRegistry
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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