pub struct ClassDecl {
pub finalizer: ClassFinalizer,
pub gc_mark: ClassGCMark,
pub exotic: *const JSClassExoticMethods,
pub name: *const c_char,
}Expand description
One class, as the C side declared it.
A copy of the JSClassDef fields rather than the struct itself, because the same class
has to be registered into every context’s interpreter, and the engine’s ClassDef owns
boxed closures — it cannot be cloned and must not be shared between interpreters.
Fields§
§finalizer: ClassFinalizerJSClassDef::finalizer, called with the payload when an instance is released.
gc_mark: ClassGCMarkJSClassDef::gc_mark.
exotic: *const JSClassExoticMethodsJSClassDef::exotic.
name: *const c_charThe name, for diagnostics.
Trait Implementations§
Auto Trait Implementations§
impl !Send for ClassDecl
impl !Sync for ClassDecl
impl Forget for ClassDecl
impl Freeze for ClassDecl
impl Move for ClassDecl
impl RefUnwindSafe for ClassDecl
impl Unpin for ClassDecl
impl UnsafeUnpin for ClassDecl
impl UnwindSafe for ClassDecl
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