pub struct ScriptEngine { /* private fields */ }Expand description
A scripting engine for custom diff analysis.
Implementations§
Source§impl ScriptEngine
impl ScriptEngine
Sourcepub fn load_script(
&mut self,
name: &str,
script: &str,
) -> Result<(), PluginError>
pub fn load_script( &mut self, name: &str, script: &str, ) -> Result<(), PluginError>
Loads a script into the engine.
Sourcepub fn execute(
&self,
script_name: &str,
function_name: &str,
diff: &StatuteDiff,
) -> Result<AnalysisResult, PluginError>
pub fn execute( &self, script_name: &str, function_name: &str, diff: &StatuteDiff, ) -> Result<AnalysisResult, PluginError>
Executes a script function with a diff.
Sourcepub fn evaluate(
&self,
script_name: &str,
diff: &StatuteDiff,
) -> Result<Dynamic, PluginError>
pub fn evaluate( &self, script_name: &str, diff: &StatuteDiff, ) -> Result<Dynamic, PluginError>
Evaluates an expression with a diff.
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more