pub struct Visitor(/* private fields */);Expand description
Visitor passed to trace methods. All managed pointers must have called the Visitor’s trace method on them.
use v8::cppgc::{Member, Visitor, GarbageCollected};
use std::ffi::CStr;
struct Foo { foo: Member<Foo> }
unsafe impl GarbageCollected for Foo {
fn trace(&self, visitor: &mut Visitor) {
visitor.trace(&self.foo);
}
fn get_name(&self) -> &'static std::ffi::CStr {
c"Foo"
}
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Visitor
impl RefUnwindSafe for Visitor
impl Send for Visitor
impl Sync for Visitor
impl Unpin for Visitor
impl UnsafeUnpin for Visitor
impl UnwindSafe for Visitor
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