Enum stacks_rpc_client::clarity::vm::callables::NativeHandle
pub enum NativeHandle {
SingleArg(&'static dyn Fn(Value) -> Result<Value, Error>),
DoubleArg(&'static dyn Fn(Value, Value) -> Result<Value, Error>),
MoreArg(&'static dyn Fn(Vec<Value>) -> Result<Value, Error>),
MoreArgEnv(&'static dyn Fn(Vec<Value>, &mut Environment<'_, '_, '_>) -> Result<Value, Error>),
}
Expand description
This enum handles the actual invocation of the method implementing a native function. Each variant handles different expected number of arguments.
Variants§
SingleArg(&'static dyn Fn(Value) -> Result<Value, Error>)
DoubleArg(&'static dyn Fn(Value, Value) -> Result<Value, Error>)
MoreArg(&'static dyn Fn(Vec<Value>) -> Result<Value, Error>)
MoreArgEnv(&'static dyn Fn(Vec<Value>, &mut Environment<'_, '_, '_>) -> Result<Value, Error>)
Implementations§
§impl NativeHandle
impl NativeHandle
Auto Trait Implementations§
impl !RefUnwindSafe for NativeHandle
impl !Send for NativeHandle
impl !Sync for NativeHandle
impl Unpin for NativeHandle
impl !UnwindSafe for NativeHandle
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