pub enum JsValue {
Undefined,
Null,
Bool(bool),
Int(i32),
Float(f64),
String(String),
Array(Vec<JsValue>),
Object(HashMap<String, JsValue>),
Function(JsFunction),
Symbol,
Date(DateTime<Utc>),
BigInt(BigInt),
// some variants omitted
}
Expand description
A value that can be (de)serialized to/from the quickjs runtime.
Variants§
Undefined
Null
Bool(bool)
Int(i32)
Float(f64)
String(String)
Array(Vec<JsValue>)
Object(HashMap<String, JsValue>)
Function(JsFunction)
Symbol
Date(DateTime<Utc>)
chrono::Datetimechrono
feature.
BigInt(BigInt)
num_bigint::BigInt / JS BigInt integration
Only available with the optional bigint
feature
Implementations§
Trait Implementations§
source§impl From<JsFunction> for JsValue
impl From<JsFunction> for JsValue
source§fn from(value: JsFunction) -> Self
fn from(value: JsFunction) -> Self
Converts to this type from the input type.
source§impl PartialEq for JsValue
impl PartialEq for JsValue
source§impl TryFrom<JsValue> for JsFunction
impl TryFrom<JsValue> for JsFunction
impl StructuralPartialEq for JsValue
Auto Trait Implementations§
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