Trait script::engine::Script

source ·
pub trait Script {
    type Error: ErrorExt + Send + Sync;

    // Required methods
    fn engine_name(&self) -> &str;
    fn as_any(&self) -> &dyn Any;
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        params: HashMap<String, String>,
        ctx: EvalContext,
    ) -> Pin<Box<dyn Future<Output = Result<Output, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

source

type Error: ErrorExt + Send + Sync

Required Methods§

source

fn engine_name(&self) -> &str

Returns the script engine name such as python etc.

source

fn as_any(&self) -> &dyn Any

source

fn execute<'life0, 'async_trait>( &'life0 self, params: HashMap<String, String>, ctx: EvalContext, ) -> Pin<Box<dyn Future<Output = Result<Output, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the script and returns the output.

Implementors§