Skip to main content

BuiltinBridgeFn

Type Alias BuiltinBridgeFn 

Source
pub type BuiltinBridgeFn = Box<dyn Fn(&str, Vec<StringKeyedValue>) -> Result<StringKeyedValue, String>>;
Expand description

Callback type for bridging tree-walker builtins into the VM.

Takes: builtin name, args as StringKeyedValue (interner-free). Returns: StringKeyedValue result or error string.

We use StringKeyedValue instead of VMValue because:

  • It doesn’t require an interner for key resolution
  • sui-eval already has string_keyed_to_eval / eval_to_string_keyed conversion functions
  • The bridge callback runs in sui-eval context where the tree-walker value types are available

Aliased Type§

pub struct BuiltinBridgeFn(/* private fields */);