[−][src]Struct mtots::Globals
The global state for mtots
Implementations
impl Globals
[src]
impl Globals
[src]
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).
pub fn readline(&mut self, prompt: &str) -> Result<Option<String>, Error>
[src]
Read a line of input Analogous to Python's 'input' function Uses rustyline if the line feature is enabled
pub fn save_line_history(&mut self) -> Result<(), Error>
[src]
impl Globals
[src]
pub fn new_handle<T>(&mut self, t: T) -> Result<Handle<T>, Error> where
T: Any,
[src]
T: Any,
pub fn set_handle_class<T>(&mut self, cls: Rc<Class>) -> Result<(), Error> where
T: Any,
[src]
T: Any,
impl Globals
[src]
impl Globals
[src]
pub fn parse(&self, source: Rc<Source>) -> Result<ModuleDisplay, Error>
[src]
pub fn repl_ready(&self, line: &str) -> bool
[src]
impl Globals
[src]
impl Globals
[src]
pub fn handle_trampoline(self)
[src]
If there is any pending trampoline request, handle it.
pub fn handle_trampoline_and_last_result<T>(self, r: Result<T, Error>)
[src]
pub fn request_trampoline<R, F>(&mut self, trampoline: F) -> Result<R, Error> where
F: FnOnce(Globals) + 'static,
[src]
F: FnOnce(Globals) + 'static,
impl Globals
[src]
pub fn new() -> Globals
[src]
pub fn trace(&self) -> &Vec<Mark>
[src]
pub fn trace_unwind(&mut self, len: usize)
[src]
pub fn register_module(&mut self, module: Rc<Module>) -> Result<(), Error>
[src]
pub fn class_manager(&self) -> &ClassManager
[src]
pub fn get_main(&self) -> &Option<RcStr>
[src]
pub fn set_main(&mut self, main_module_name: RcStr)
[src]
pub fn exec(&mut self, source: Rc<Source>) -> Result<Rc<Module>, Error>
[src]
pub fn exec_str(
&mut self,
name: &str,
path: Option<&str>,
data: &str
) -> Result<Rc<Module>, Error>
[src]
&mut self,
name: &str,
path: Option<&str>,
data: &str
) -> Result<Rc<Module>, Error>
pub fn exec_repl(&mut self, data: &str) -> Result<Value, Error>
[src]
pub fn argv(&self) -> &Option<Vec<RcStr>>
[src]
pub fn set_argv(&mut self, argv: Vec<RcStr>)
[src]
impl Globals
[src]
pub fn add_builtin_native_libraries(&mut self)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Globals
impl !Send for Globals
impl !Sync for Globals
impl Unpin for Globals
impl !UnwindSafe for Globals
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,