intuicio_core::script

Trait ScriptFunctionGenerator

Source
pub trait ScriptFunctionGenerator<SE: ScriptExpression> {
    type Input;
    type Output;

    // Required method
    fn generate_function_body(
        script: ScriptHandle<'static, SE>,
        input: Self::Input,
    ) -> Option<(FunctionBody, Self::Output)>;

    // Provided method
    fn generate_function(
        function: &ScriptFunction<'static, SE>,
        registry: &Registry,
        input: Self::Input,
    ) -> Option<(Function, Self::Output)> { ... }
}

Required Associated Types§

Required Methods§

Source

fn generate_function_body( script: ScriptHandle<'static, SE>, input: Self::Input, ) -> Option<(FunctionBody, Self::Output)>

Provided Methods§

Source

fn generate_function( function: &ScriptFunction<'static, SE>, registry: &Registry, input: Self::Input, ) -> Option<(Function, 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§