pub trait ScriptEngine {
type Error: ErrorExt + Send + Sync;
type Script: Script<Error = Self::Error>;
// Required methods
fn name(&self) -> &str;
fn as_any(&self) -> &dyn Any;
fn compile<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 str,
ctx: CompileContext,
) -> Pin<Box<dyn Future<Output = Result<Self::Script, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Associated Types§
Required Methods§
fn as_any(&self) -> &dyn Any
sourcefn compile<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 str,
ctx: CompileContext,
) -> Pin<Box<dyn Future<Output = Result<Self::Script, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compile<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 str,
ctx: CompileContext,
) -> Pin<Box<dyn Future<Output = Result<Self::Script, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Compile a script text into a script instance.