pub(crate) type JSVal = Value;
Aliased Type§
struct JSVal {
pub asBits_: u64,
}
Fields§
§asBits_: u64
Implementations
Source§impl Value
impl Value
pub fn is_undefined(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_null_or_undefined(&self) -> bool
pub fn is_boolean(&self) -> bool
pub fn is_int32(&self) -> bool
pub fn is_double(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_primitive(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_object_or_null(&self) -> bool
pub fn is_magic(&self) -> bool
pub fn is_symbol(&self) -> bool
pub fn is_bigint(&self) -> bool
pub fn is_gcthing(&self) -> bool
pub fn to_boolean(&self) -> bool
pub fn to_int32(&self) -> i32
pub fn to_double(&self) -> f64
pub fn to_number(&self) -> f64
pub fn to_string(&self) -> *mut JSString
pub fn to_object(&self) -> *mut JSObject
pub fn to_object_or_null(&self) -> *mut JSObject
pub fn to_symbol(&self) -> *mut Symbol
pub fn to_bigint(&self) -> *mut BigInt
pub fn to_private(&self) -> *const c_void
pub fn to_gcthing(&self) -> *mut c_void
pub fn is_markable(&self) -> bool
pub fn trace_kind(&self) -> TraceKind
Trait Implementations
Source§impl FromJSValConvertible for Value
impl FromJSValConvertible for Value
Source§unsafe fn from_jsval(
_cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<Value>, ()>
unsafe fn from_jsval( _cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<Value>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.