pub enum JsValue {
Undefined,
Null,
Boolean(bool),
String(String),
Symbol(SymbolData),
Number(JsNumberType),
Object(JsObjectType),
}Expand description
JavaScript value representation.
Represents all possible JavaScript values including primitives and objects. This is the primary value type used throughout the engine.
§Examples
use just::runner::ds::value::{JsValue, JsNumberType};
let undefined = JsValue::Undefined;
let null = JsValue::Null;
let boolean = JsValue::Boolean(true);
let string = JsValue::String("hello".to_string());
let number = JsValue::Number(JsNumberType::Integer(42));Variants§
Undefined
The undefined value.
Null
The null value.
Boolean(bool)
A boolean value (true or false).
String(String)
A string value.
Symbol(SymbolData)
A symbol value (ES6 symbols).
Number(JsNumberType)
A numeric value (integer or float).
Object(JsObjectType)
An object value (including arrays, functions, etc.).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsValue
impl !RefUnwindSafe for JsValue
impl !Send for JsValue
impl !Sync for JsValue
impl Unpin for JsValue
impl !UnwindSafe for JsValue
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