pub struct LangObject { /* private fields */ }
Implementations§
Source§impl LangObject
impl LangObject
Sourcepub fn object_class() -> LangObjectRef
pub fn object_class() -> LangObjectRef
Returns the “&Object” lang object base class
pub fn new_class( class_name: Option<&str>, static_members: Vec<DataObject>, members: Vec<MemberDefinition>, methods: HashMap<Box<str>, FunctionPointerObject>, method_override_flags: HashMap<Box<str>, Vec<bool>>, method_visibility: HashMap<Box<str>, Vec<Visibility>>, constructors: FunctionPointerObject, constructor_visibility: Vec<Visibility>, parent_classes: Vec<LangObjectRef>, ) -> Result<LangObjectRef, DataTypeConstraintError>
Sourcepub fn new_object(
class_base_definition: &LangObjectRef,
) -> Result<LangObjectRef, DataTypeConstraintError>
pub fn new_object( class_base_definition: &LangObjectRef, ) -> Result<LangObjectRef, DataTypeConstraintError>
The constructor must be called separately, afterward postConstructor must be called
pub fn super_level(&self) -> Option<usize>
pub fn set_super_level( &mut self, super_level: usize, ) -> Result<(), DataTypeConstraintError>
pub fn post_construct(&mut self) -> Result<(), DataTypeConstraintError>
pub fn is_initialized(&self) -> Option<bool>
pub fn is_class(&self) -> bool
pub fn class_name(&self) -> Option<&str>
pub fn static_members(&self) -> &[DataObjectRef]
pub fn index_of_static_member(&self, member_name: &str) -> Option<usize>
pub fn static_member( &self, member_name: &str, ) -> Result<&DataObjectRef, DataTypeConstraintError>
pub fn member_definitions(&self) -> Option<&[MemberDefinition]>
pub fn members(&self) -> Option<&[DataObjectRef]>
pub fn index_of_member( &self, member_name: &str, ) -> Result<Option<usize>, DataTypeConstraintError>
pub fn member( &self, member_name: &str, ) -> Result<&DataObjectRef, DataTypeConstraintError>
pub fn methods(&self) -> &HashMap<Box<str>, Gc<FunctionPointerObject>>
pub fn super_methods(&self) -> HashMap<Box<str>, FunctionPointerObjectRef>
pub fn constructors(&self) -> FunctionPointerObjectRef
Sourcepub fn constructors_for_current_super_level(&self) -> FunctionPointerObjectRef
pub fn constructors_for_current_super_level(&self) -> FunctionPointerObjectRef
@return Returns all constructors for the current super level without going to super [0 is current, 1 is parent, 2 is grandparent]
pub fn super_constructors(&self) -> FunctionPointerObjectRef
pub fn parent_classes(&self) -> Option<&[LangObjectRef]>
pub fn base_definition(&self) -> OptionLangObjectRef
pub fn is_instance_of(&self, lang_object: &LangObject) -> bool
Trait Implementations§
Source§impl Debug for LangObject
impl Debug for LangObject
Source§impl Display for LangObject
impl Display for LangObject
Source§impl Drop for LangObject
impl Drop for LangObject
Source§impl Trace for LangObject
impl Trace for LangObject
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs
Finalize::finalize()
on this object and all
contained subobjectsAuto Trait Implementations§
impl !Freeze for LangObject
impl !RefUnwindSafe for LangObject
impl !Send for LangObject
impl !Sync for LangObject
impl Unpin for LangObject
impl !UnwindSafe for LangObject
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