pub struct Module { /* private fields */ }
Implementations§
Source§impl Module
impl Module
pub fn new(name: impl Into<String>) -> Self
pub fn register_struct(&mut self, name: &str, s: Struct)
pub fn get_structs(&self) -> &HashMap<String, Struct>
pub fn get_struct(&self, name: &str) -> Option<&Struct>
pub fn add_stmt(&mut self, stmt: StmtNode)
pub fn get_class(&self, class_name: &str) -> Option<&Class>
pub fn get_functions(&self) -> HashMap<String, Function>
pub fn get_submodules(&self) -> &HashMap<String, DefaultKey>
pub fn get_mut_functions(&mut self) -> &mut HashMap<String, Function>
pub fn register_function(&mut self, name: &str, f: Function)
pub fn push_block(&mut self, block: Vec<StmtNode>)
pub fn get_global_block(&self) -> &Vec<StmtNode>
pub fn get_classes(&self) -> &HashMap<String, Class>
pub fn get_class_function( &self, class_name: &str, function_name: &str, ) -> Option<Function>
pub fn register_class_method( &mut self, class_name: impl AsRef<str>, method_name: impl Into<String>, method: Function, )
pub fn get_name(&self) -> String
pub fn merge(&mut self, module: &Module)
pub fn sort_global_block(&mut self)
pub fn get_submodule(&self, name: &str) -> &DefaultKey
pub fn merge_into_main(&mut self, ctx: &Context, name: &str) -> bool
pub fn register_submodule(&mut self, name: &str, module: DefaultKey)
pub fn get_function(&self, name: impl Into<String>) -> Option<Function>
pub fn set_name(&mut self, name: impl Into<String>)
pub fn register_type_alias( &mut self, name: &str, ty: Type, generic_list: Vec<String>, )
pub fn get_type_alias(&self, name: &str) -> Option<&TypeAlias>
pub fn get_type_aliases(&self) -> &HashMap<String, TypeAlias>
Trait Implementations§
Source§impl NodeTrait for Module
impl NodeTrait for Module
fn get_id(&self) -> &str
fn get_data(&self, key: &str) -> Option<Data>
fn set_data(&mut self, _: &str, _: Data)
fn get_children(&self) -> Vec<&dyn NodeTrait>
fn get_mut_children(&mut self) -> Vec<&mut dyn NodeTrait>
fn get_extra(&self) -> &HashMap<String, Box<dyn Any>>
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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