Expand description
Native function interface exposed to host code.
Hosts implement RelonFunction and register the resulting function under
a path name via Context::register_fn. The evaluator passes a
NativeArgs bundle that pre-splits positional and named arguments so
implementations can validate either view without re-parsing.
NativeFn is a re-export alias of dyn RelonFunction so call sites
that want a shorter spelling can write NativeFn instead of the longer
trait-object form. The two names refer to the same trait.
Structs§
- Evaluated
Arg - A single evaluated argument from a Relon call site, preserving its name if
it was passed as
name=value. - Native
Args - Argument bundle handed to a
RelonFunction. Positional and named arguments are split apart up front so each host function only inspects what it cares about.
Traits§
- Native
FnCaps - A handle to the evaluator’s internal execution capabilities, allowing native functions to call back into Relon logic (closures).
- Relon
Function - Host-implemented native function. Registered into a
crate::ContextviaContext::register_fn/register_pure_fn.
Type Aliases§
- Native
Fn - Convenience alias for the
dyn RelonFunctiontrait object. Hosts that store native fns by trait object can writeArc<dyn NativeFn>instead ofArc<dyn RelonFunction>— the two are interchangeable.