pub struct Globals { /* private fields */ }
Expand description
The global state for mtots
Implementations§
Source§impl Globals
Functions for readline-style editing and history
These functions only work if the “line” feature of this crate is enabled.
Otherwise these will be nops (for history related) and a much more
primitive implementation (for the readline method).
impl Globals
Functions for readline-style editing and history These functions only work if the “line” feature of this crate is enabled. Otherwise these will be nops (for history related) and a much more primitive implementation (for the readline method).
Source§impl Globals
impl Globals
pub fn parse(&self, source: Rc<Source>) -> Result<ModuleDisplay>
pub fn repl_ready(&self, line: &str) -> bool
Source§impl Globals
impl Globals
Sourcepub fn handle_trampoline(self)
pub fn handle_trampoline(self)
If there is any pending trampoline request, handle it.
pub fn handle_trampoline_and_last_result<T>(self, r: Result<T>)
pub fn request_trampoline<R, F>(&mut self, trampoline: F) -> Result<R>
Source§impl Globals
impl Globals
pub fn new() -> Self
pub fn trace(&self) -> &Vec<Mark>
pub fn trace_unwind(&mut self, len: usize)
pub fn register_module(&mut self, module: Rc<Module>) -> Result<()>
pub fn class_manager(&self) -> &ClassManager
pub fn get_main(&self) -> &Option<RcStr>
pub fn set_main(&mut self, main_module_name: RcStr)
pub fn exec(&mut self, source: Rc<Source>) -> Result<Rc<Module>>
pub fn exec_str( &mut self, name: &str, path: Option<&str>, data: &str, ) -> Result<Rc<Module>>
pub fn exec_repl(&mut self, data: &str) -> Result<Value>
pub fn argv(&self) -> &Option<Vec<RcStr>>
pub fn set_argv(&mut self, argv: Vec<RcStr>)
Source§impl Globals
impl Globals
pub fn add_builtin_native_libraries(&mut self)
Auto Trait Implementations§
impl Freeze for Globals
impl !RefUnwindSafe for Globals
impl !Send for Globals
impl !Sync for Globals
impl Unpin for Globals
impl !UnwindSafe for Globals
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