pub struct JSValue(/* private fields */);Implementations§
Source§impl JSValue
impl JSValue
pub fn raw_bits(&self) -> u64
pub fn from_raw_bits(bits: u64) -> Self
pub fn new_int(i: i64) -> Self
pub fn new_float(f: f64) -> Self
pub fn is_float(&self) -> bool
pub fn new_string(atom: Atom) -> Self
pub fn new_object(ptr: usize) -> Self
pub fn new_function(ptr: usize) -> Self
pub fn new_symbol(atom: Atom) -> Self
pub fn new_symbol_with_id(atom: Atom, id: u32) -> Self
pub fn get_symbol_id(&self) -> u32
pub fn new_bigint(ptr: usize) -> Self
pub const fn undefined() -> Self
pub const fn null() -> Self
pub const fn bool(b: bool) -> Self
pub fn is_undefined(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_null_or_undefined(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_int(&self) -> bool
pub fn both_int(a: &JSValue, b: &JSValue) -> bool
pub fn both_object(a: &JSValue, b: &JSValue) -> bool
pub fn both_raw_float(a: &JSValue, b: &JSValue) -> bool
pub fn new_float_raw(f: f64) -> Self
pub fn is_string(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_function(&self) -> bool
pub fn is_symbol(&self) -> bool
pub fn is_bigint(&self) -> bool
pub fn is_object_like(&self) -> bool
pub const fn new_tdz() -> Self
pub fn is_tdz(&self) -> bool
pub fn get_int(&self) -> i64
pub fn to_number(&self) -> f64
pub fn get_float(&self) -> f64
pub fn get_atom(&self) -> Atom
pub fn get_ptr(&self) -> usize
pub unsafe fn object_from_ptr(ptr: usize) -> &'static JSObject
pub unsafe fn object_from_ptr_mut(ptr: usize) -> &'static mut JSObject
pub unsafe fn function_from_ptr(ptr: usize) -> &'static JSFunction
pub unsafe fn function_from_ptr_mut(ptr: usize) -> &'static mut JSFunction
pub fn as_object(&self) -> &JSObject
pub fn as_object_mut(&self) -> &mut JSObject
pub fn as_function(&self) -> &JSFunction
pub fn as_function_mut(&self) -> &mut JSFunction
pub fn get_bool(&self) -> bool
pub fn is_truthy(&self) -> bool
pub fn strict_eq(&self, other: &JSValue) -> bool
pub fn debug_raw(&self) -> u64
pub fn get_data(&self) -> u64
pub fn retain_atoms_in(&self, ctx: &mut JSContext)
pub fn release_atoms_in(&self, ctx: &mut JSContext)
pub fn release_atoms_in_table(&self, table: &mut AtomTable)
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 UnsafeUnpin 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