pub trait FunctionBodyPolicy:
Send
+ Sync
+ 'static {
// Required method
fn invoke(
&self,
cx: &mut Cx,
plan: &FunctionPlan,
captures: &[CapturedBinding],
call: BoundCall,
) -> KernelResult<Value>;
}Expand description
Guest-owned execution policy for one concrete function body type.
The policy is statically selected by FunctionInstance. It receives the
neutral call record and shared capture cells, leaving defaults, keyword
rules, receiver behavior, evaluation, and diagnostics to the guest.
Required Methods§
Sourcefn invoke(
&self,
cx: &mut Cx,
plan: &FunctionPlan,
captures: &[CapturedBinding],
call: BoundCall,
) -> KernelResult<Value>
fn invoke( &self, cx: &mut Cx, plan: &FunctionPlan, captures: &[CapturedBinding], call: BoundCall, ) -> KernelResult<Value>
Executes this body using the immutable declaration and live captures.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".