pub struct RClass {
pub module: Rc<RModule>,
pub super_class: Option<Rc<RClass>>,
pub singleton_class_ref: RefCell<Option<Rc<RClass>>>,
pub is_singleton: bool,
pub extended_modules: RefCell<Vec<Rc<RModule>>>,
}Expand description
Ruby class metadata, including its module namespace and optional superclass. Attributes and methods required for Class implementation are stored in the associated RModule.
Fields§
§module: Rc<RModule>§super_class: Option<Rc<RClass>>§singleton_class_ref: RefCell<Option<Rc<RClass>>>§is_singleton: bool§extended_modules: RefCell<Vec<Rc<RModule>>>Implementations§
Source§impl RClass
impl RClass
pub fn new( name: &str, super_class: Option<Rc<RClass>>, parent_module: Option<Rc<RModule>>, ) -> Self
pub fn new_singleton( name: &str, super_class: Option<Rc<RClass>>, parent_module: Option<Rc<RModule>>, ) -> Self
pub fn getmcnst(&self, name: &str) -> Option<Rc<RObject>>
pub fn find_method(&self, name: &str) -> Option<RProc>
pub fn full_name(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RClass
impl !RefUnwindSafe for RClass
impl !Send for RClass
impl !Sync for RClass
impl Unpin for RClass
impl UnsafeUnpin for RClass
impl !UnwindSafe for RClass
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