pub struct Opaque(/* private fields */);Expand description
A pointer the engine never dereferences.
This is the payload of JS_SetOpaque: the host owns whatever it points at, and the
engine’s whole involvement is handing it back unchanged, showing it to gc_mark, and
passing it to the finalizer. Storing, copying and comparing a raw pointer are safe
operations in Rust — only the host’s own code ever dereferences it — which is what lets
this live in quickjs-pure without the crate growing an unsafe block.
Implementations§
Trait Implementations§
impl Copy for Opaque
impl Eq for Opaque
impl StructuralPartialEq for Opaque
Auto Trait Implementations§
impl !Send for Opaque
impl !Sync for Opaque
impl Forget for Opaque
impl Freeze for Opaque
impl Move for Opaque
impl RefUnwindSafe for Opaque
impl Unpin for Opaque
impl UnsafeUnpin for Opaque
impl UnwindSafe for Opaque
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