pub trait BuiltinGen: Fn(Vec<Value>) -> Gen<VMRequest, VMResponse, Pin<Box<dyn Future<Output = Result<Value, ErrorKind>>>>> { }
Expand description

Trait for closure types of builtins.

Builtins are expected to yield a generator which can be run by the VM to produce the final value.

Implementors should use the builtins-macros to create these functions instead of handling the argument-passing logic manually.