pub struct JsRef(/* private fields */);Implementations§
Source§impl JsRef
impl JsRef
pub const fn is_special_value(self) -> bool
pub const fn is_owned_heap_ref(self) -> bool
pub const fn into_abi(self) -> u32
pub const fn from_abi(abi: u32) -> JsRef
Sourcepub fn next_borrowed_ref() -> JsRef
pub fn next_borrowed_ref() -> JsRef
Reserve a handle to the next borrowed JS reference.
Borrowed references occupy the borrow stack (indices 1-127) rather than a heap slot; JS puts the value on its borrow stack without sending an id, so Rust syncs by reserving the matching handle here.
Sourcepub fn drop_js_object(self)
pub fn drop_js_object(self)
Release this JS heap object.
Sourcepub fn dispose_js_rust_function(self)
pub fn dispose_js_rust_function(self)
Dispose the JS wrapper for the Rust callback behind this reference.
Sourcepub fn invalidate_js_rust_function(self)
pub fn invalidate_js_rust_function(self)
Mark the JS wrapper for the Rust callback behind this reference as unusable.
Trait Implementations§
Source§impl BatchableResult for JsRef
impl BatchableResult for JsRef
fn try_placeholder(batch: &mut Runtime<'_>) -> Option<Self>
Source§impl BinaryDecode for JsRef
impl BinaryDecode for JsRef
fn decode(_decoder: &mut DecodedData<'_>) -> Result<JsRef, DecodeError>
Source§impl BinaryEncode for JsRef
impl BinaryEncode for JsRef
fn encode(self, encoder: &mut EncodedData)
impl Copy for JsRef
Source§impl EncodeTypeDef for JsRef
impl EncodeTypeDef for JsRef
fn encode_type_def(type_def: &mut TypeDef)
impl Eq for JsRef
impl StructuralPartialEq for JsRef
Auto Trait Implementations§
impl Freeze for JsRef
impl RefUnwindSafe for JsRef
impl Send for JsRef
impl Sync for JsRef
impl Unpin for JsRef
impl UnsafeUnpin for JsRef
impl UnwindSafe for JsRef
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