pub struct ScriptEngine { /* private fields */ }Expand description
Sandboxed Rhai engine for executing custom validators, transforms, and logic.
Implementations§
Source§impl ScriptEngine
impl ScriptEngine
Sourcepub fn validate(&self, script: &str, content: &str) -> Result<bool>
pub fn validate(&self, script: &str, content: &str) -> Result<bool>
Validate content using a Rhai script.
Sourcepub fn transform(&self, script: &str, input: Map) -> Result<String>
pub fn transform(&self, script: &str, input: Map) -> Result<String>
Transform content using a Rhai script.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ScriptEngine
impl !RefUnwindSafe for ScriptEngine
impl !UnwindSafe for ScriptEngine
impl Send for ScriptEngine
impl Sync for ScriptEngine
impl Unpin for ScriptEngine
impl UnsafeUnpin 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