#[repr(C)]pub struct ClassDesc {
pub name: FfiStr,
pub methods: *const MethodDesc,
pub methods_len: usize,
pub drop: Option<extern "C" fn(opaque_ptr: *mut c_void)>,
pub traverse: Option<extern "C" fn(opaque_ptr: *mut c_void, visit: PluginVisitFn, visit_ctx: *mut c_void) -> i32>,
}Expand description
Description of a plugin-defined class; one entry per class in
ModuleDesc::classes.
Fields§
§name: FfiStrClass name as seen from generic code (e.g. "Counter").
methods: *const MethodDescPointer to methods_len contiguous MethodDesc entries.
methods_len: usizeNumber of entries in methods.
drop: Option<extern "C" fn(opaque_ptr: *mut c_void)>Destructor for the plugin’s opaque per-instance state, called by the
host with the *mut c_void installed via instance_set_opaque when a
plugin-backed instance is garbage-collected. May be null if the plugin
manages the lifetime itself (rare).
traverse: Option<extern "C" fn(opaque_ptr: *mut c_void, visit: PluginVisitFn, visit_ctx: *mut c_void) -> i32>GC traversal callback, called during the mark phase for each live
plugin-backed instance. May be null if the opaque struct holds no
GenericValues. This is PluginTraverseFn spelled out inline -
cbindgen only renders a nullable C function pointer for an inline
Option<fn>, not through the alias.