pub struct QuickJsValueAdapter { /* private fields */ }
Implementations§
source§impl QuickJsValueAdapter
impl QuickJsValueAdapter
pub fn get_tag(&self) -> i64
pub fn new_no_context(value: JSValue, label: &str) -> Self
pub fn new( context: *mut JSContext, value: JSValue, ref_ct_incr: bool, ref_ct_decr_on_drop: bool, label: &str ) -> Self
pub fn get_ref_count(&self) -> i32
sourcepub fn clone_value_incr_rc(&self) -> JSValue
pub fn clone_value_incr_rc(&self) -> JSValue
borrow the value but first increment the refcount, this is useful for when the value is returned or passed to functions
pub fn borrow_value(&self) -> &JSValue
pub fn borrow_value_mut(&mut self) -> &mut JSValue
pub fn is_null_or_undefined(&self) -> bool
sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
return true if the wrapped value represents a JS null value
sourcepub fn is_compiled_function(&self) -> bool
pub fn is_compiled_function(&self) -> bool
return true if the wrapped value represents a compiled function
pub fn is_big_int(&self) -> bool
sourcepub fn is_exception(&self) -> bool
pub fn is_exception(&self) -> bool
return true if the wrapped value represents a JS Exception value
source§impl QuickJsValueAdapter
impl QuickJsValueAdapter
pub fn is_function(&self) -> bool
pub fn is_array(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_promise(&self) -> bool
pub fn get_js_type(&self) -> JsValueType
pub fn is_typed_array(&self) -> bool
pub fn is_proxy_instance(&self) -> bool
pub fn type_of(&self) -> &'static str
pub fn to_bool(&self) -> bool
pub fn to_i32(&self) -> i32
pub fn to_f64(&self) -> f64
pub fn to_string(&self) -> Result<String, JsError>
pub fn to_str(&self) -> Result<&str, JsError>
Trait Implementations§
source§impl Clone for QuickJsValueAdapter
impl Clone for QuickJsValueAdapter
source§impl Debug for QuickJsValueAdapter
impl Debug for QuickJsValueAdapter
source§impl Drop for QuickJsValueAdapter
impl Drop for QuickJsValueAdapter
source§impl Hash for QuickJsValueAdapter
impl Hash for QuickJsValueAdapter
source§impl PartialEq<QuickJsValueAdapter> for QuickJsValueAdapter
impl PartialEq<QuickJsValueAdapter> for QuickJsValueAdapter
impl Eq for QuickJsValueAdapter
Auto Trait Implementations§
impl RefUnwindSafe for QuickJsValueAdapter
impl !Send for QuickJsValueAdapter
impl !Sync for QuickJsValueAdapter
impl Unpin for QuickJsValueAdapter
impl UnwindSafe for QuickJsValueAdapter
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