wasmi_validation

Trait FuncValidator

Source
pub trait FuncValidator {
    type Input;
    type Output;

    // Required methods
    fn new(
        ctx: &FunctionValidationContext<'_>,
        body: &FuncBody,
        input: Self::Input,
    ) -> Self;
    fn next_instruction(
        &mut self,
        ctx: &mut FunctionValidationContext<'_>,
        instruction: &Instruction,
    ) -> Result<(), Error>;
    fn finish(self, ctx: &FunctionValidationContext<'_>) -> Self::Output;
}

Required Associated Types§

Source

type Input

Custom inputs to the function validator constructor.

Source

type Output

Required Methods§

Source

fn new( ctx: &FunctionValidationContext<'_>, body: &FuncBody, input: Self::Input, ) -> Self

Source

fn next_instruction( &mut self, ctx: &mut FunctionValidationContext<'_>, instruction: &Instruction, ) -> Result<(), Error>

Source

fn finish(self, ctx: &FunctionValidationContext<'_>) -> Self::Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§