Struct bean_script::modules::CustomModule
source · pub struct CustomModule {
pub file_path: PathBuf,
pub if_state: IfState,
pub exported_functions: MutRc<HashMap<String, Function>>,
pub submodules: MutRc<HashMap<String, MutRc<CustomModule>>>,
/* private fields */
}
Fields§
§file_path: PathBuf
§if_state: IfState
§exported_functions: MutRc<HashMap<String, Function>>
§submodules: MutRc<HashMap<String, MutRc<CustomModule>>>
Implementations§
source§impl CustomModule
impl CustomModule
pub fn new(registry: MutRc<ModuleRegistry>, file_path: PathBuf) -> Self
Trait Implementations§
source§impl Clone for CustomModule
impl Clone for CustomModule
source§fn clone(&self) -> CustomModule
fn clone(&self) -> CustomModule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CustomModule
impl Debug for CustomModule
source§impl Module for CustomModule
impl Module for CustomModule
source§impl Scope for CustomModule
impl Scope for CustomModule
fn has_function(&self, name: &str) -> bool
fn get_function(&self, name: &str) -> Option<Function>
fn set_function(&mut self, name: &str, function: Function)
fn delete_function(&mut self, name: &str)
fn parent(&self) -> Option<ScopeRef>
fn set_return_value(&mut self, _v: Data)
fn get_function_list(&self) -> HashMap<String, Function>
fn get_file_module(&self) -> Option<ScopeRef>
fn as_any(&self) -> &dyn Any
fn as_mut(&mut self) -> &mut dyn Any
fn set_if_state(&mut self, state: IfState)
fn get_call_scope(&self) -> Option<Rc<RefCell<CallScope>>>
fn to_string(&self) -> String
Auto Trait Implementations§
impl Freeze for CustomModule
impl !RefUnwindSafe for CustomModule
impl !Send for CustomModule
impl !Sync for CustomModule
impl Unpin for CustomModule
impl !UnwindSafe for CustomModule
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