pub struct RefusingEngine;Expand description
The engine when there is none.
Every call fails, with a message that says what is missing rather than what went wrong. A hook point wired to scripts in a build with no engine should be inert and legible, not mysterious.
Trait Implementations§
Source§impl ScriptEngine for RefusingEngine
impl ScriptEngine for RefusingEngine
Source§fn eval<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_script: &'life1 ScriptSource,
_entry: &'life2 str,
_input: Value,
_limits: &'life3 ScriptLimits,
) -> Pin<Box<dyn Future<Output = Result<Value, ScriptError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn eval<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_script: &'life1 ScriptSource,
_entry: &'life2 str,
_input: Value,
_limits: &'life3 ScriptLimits,
) -> Pin<Box<dyn Future<Output = Result<Value, ScriptError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn eval_blocking(
&self,
_script: &ScriptSource,
_entry: &str,
_input: Value,
_limits: &ScriptLimits,
) -> Result<Value, ScriptError>
fn eval_blocking( &self, _script: &ScriptSource, _entry: &str, _input: Value, _limits: &ScriptLimits, ) -> Result<Value, ScriptError>
The same call, from somewhere that cannot await. Read more
Auto Trait Implementations§
impl Forget for RefusingEngine
impl Freeze for RefusingEngine
impl Move for RefusingEngine
impl RefUnwindSafe for RefusingEngine
impl Send for RefusingEngine
impl Sync for RefusingEngine
impl Unpin for RefusingEngine
impl UnsafeUnpin for RefusingEngine
impl UnwindSafe for RefusingEngine
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