pub enum EvalResult {
Ok {
value: String,
js_type: String,
},
Thrown {
kind: String,
message: String,
},
Syntax {
message: String,
},
}Expand description
Result of Engine::eval_js. The Ok variant carries a JSON-
serialized value (or empty for undefined/null); errors are
distinguished by kind so the agent can react differently to a
thrown exception vs. a SyntaxError vs. a binding/IO failure.
Variants§
Ok
Fields
Thrown
Runtime error thrown during evaluation.
Syntax
Parser error — the expression was syntactically invalid.
Trait Implementations§
Source§impl Clone for EvalResult
impl Clone for EvalResult
Source§fn clone(&self) -> EvalResult
fn clone(&self) -> EvalResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EvalResult
impl RefUnwindSafe for EvalResult
impl Send for EvalResult
impl Sync for EvalResult
impl Unpin for EvalResult
impl UnsafeUnpin for EvalResult
impl UnwindSafe for EvalResult
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