pub struct BuiltinsRegistry { /* private fields */ }Expand description
Registry for namespace-aware built-in functions
Manages multiple providers and dispatches function calls deterministically.
Implementations§
Source§impl BuiltinsRegistry
impl BuiltinsRegistry
Sourcepub fn register(
&mut self,
provider: &dyn BuiltinsProvider,
) -> Result<(), String>
pub fn register( &mut self, provider: &dyn BuiltinsProvider, ) -> Result<(), String>
Register a built-ins provider
Returns error if the namespace is already registered
Sourcepub fn call(
&self,
namespace: &str,
function_name: &str,
args: &[Value],
) -> Result<Value, EvalError>
pub fn call( &self, namespace: &str, function_name: &str, args: &[Value], ) -> Result<Value, EvalError>
Sourcepub fn has_function(&self, namespace: &str, function_name: &str) -> bool
pub fn has_function(&self, namespace: &str, function_name: &str) -> bool
Check if a function exists
Sourcepub fn namespaces(&self) -> Vec<String>
pub fn namespaces(&self) -> Vec<String>
List all registered namespaces
Trait Implementations§
Source§impl Clone for BuiltinsRegistry
impl Clone for BuiltinsRegistry
Source§fn clone(&self) -> BuiltinsRegistry
fn clone(&self) -> BuiltinsRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BuiltinsRegistry
impl !RefUnwindSafe for BuiltinsRegistry
impl Send for BuiltinsRegistry
impl Sync for BuiltinsRegistry
impl Unpin for BuiltinsRegistry
impl !UnwindSafe for BuiltinsRegistry
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