pub struct DynamicRegistry { /* private fields */ }Implementations§
Source§impl DynamicRegistry
impl DynamicRegistry
pub fn new() -> Self
pub fn register_function( &mut self, name: impl Into<String>, arity: usize, handler: impl Fn(&[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_function_with_context( &mut self, name: impl Into<String>, arity: usize, handler: impl for<'a> Fn(RuntimeCallContext<'a>, &[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_function_capability( &mut self, capability: CapabilityMeta, handler: impl Fn(&[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_function_capability_with_context( &mut self, capability: CapabilityMeta, handler: impl for<'a> Fn(RuntimeCallContext<'a>, &[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_method( &mut self, name: impl Into<String>, arity: usize, handler: impl Fn(&Value, &[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_method_with_context( &mut self, name: impl Into<String>, arity: usize, handler: impl for<'a> Fn(RuntimeCallContext<'a>, &Value, &[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_method_capability( &mut self, capability: CapabilityMeta, handler: impl Fn(&Value, &[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_method_capability_with_context( &mut self, capability: CapabilityMeta, handler: impl for<'a> Fn(RuntimeCallContext<'a>, &Value, &[Value]) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_unary_operator( &mut self, op: UnaryOp, handler: impl Fn(Value) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_unary_operator_capability( &mut self, capability: CapabilityMeta, handler: impl Fn(Value) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_binary_operator( &mut self, op: BinaryOp, handler: impl Fn(Value, Value) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn register_binary_operator_capability( &mut self, capability: CapabilityMeta, handler: impl Fn(Value, Value) -> Result<Value, EvalError> + Send + Sync + 'static, ) -> &mut Self
pub fn schema(&self) -> RuntimeSchema
Trait Implementations§
Source§impl Clone for DynamicRegistry
impl Clone for DynamicRegistry
Source§fn clone(&self) -> DynamicRegistry
fn clone(&self) -> DynamicRegistry
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 Default for DynamicRegistry
impl Default for DynamicRegistry
Source§fn default() -> DynamicRegistry
fn default() -> DynamicRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DynamicRegistry
impl !UnwindSafe for DynamicRegistry
impl Freeze for DynamicRegistry
impl Send for DynamicRegistry
impl Sync for DynamicRegistry
impl Unpin for DynamicRegistry
impl UnsafeUnpin for DynamicRegistry
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