pub struct ScriptEngine { /* private fields */ }Expand description
Rhai script engine.
Implementations§
Source§impl ScriptEngine
impl ScriptEngine
Sourcepub fn run(&self, script: &str, context: &ScriptContext) -> Result<ScriptOutput>
pub fn run(&self, script: &str, context: &ScriptContext) -> Result<ScriptOutput>
Run a script with the given context.
Sourcepub fn run_ast(
&self,
ast: &AST,
context: &ScriptContext,
) -> Result<ScriptOutput>
pub fn run_ast( &self, ast: &AST, context: &ScriptContext, ) -> Result<ScriptOutput>
Run a compiled script with the given context.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ScriptEngine
impl !RefUnwindSafe for ScriptEngine
impl !Send for ScriptEngine
impl !Sync for ScriptEngine
impl Unpin for ScriptEngine
impl !UnwindSafe for ScriptEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more