pub struct ClassEnv { /* private fields */ }Expand description
What a definer knows when it defines a class (16.2): who it is, the descriptors of the method functions, and the flattened descriptors of the classes it knows (parents, interfaces). Both are looked up by hash.
Implementations§
Source§impl ClassEnv
impl ClassEnv
Sourcepub fn new(definer: &str) -> ClassEnv
pub fn new(definer: &str) -> ClassEnv
An environment for definer, the namespace defining (a class is defined under it, its own
namespace or one below: E_CLASS_OWNER).
Sourcepub fn insert_function(&mut self, d: FunctionDescriptor)
pub fn insert_function(&mut self, d: FunctionDescriptor)
A function descriptor the definer knows, under its function hash.
Sourcepub fn insert_class(&mut self, c: ClassDescriptor)
pub fn insert_class(&mut self, c: ClassDescriptor)
A flattened class descriptor the definer knows, under its class hash.
Sourcepub fn function(&self, hash: &str) -> Option<&FunctionDescriptor>
pub fn function(&self, hash: &str) -> Option<&FunctionDescriptor>
The function descriptor with this hash.
Sourcepub fn class(&self, hash: &str) -> Option<&ClassDescriptor>
pub fn class(&self, hash: &str) -> Option<&ClassDescriptor>
The flattened class descriptor with this class hash.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ClassEnv
impl Freeze for ClassEnv
impl Move for ClassEnv
impl RefUnwindSafe for ClassEnv
impl Send for ClassEnv
impl Sync for ClassEnv
impl Unpin for ClassEnv
impl UnsafeUnpin for ClassEnv
impl UnwindSafe for ClassEnv
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