[][src]Struct mtots::Globals

pub struct Globals { /* fields omitted */ }

Implementations

impl Globals[src]

pub fn new() -> Globals[src]

pub fn trace_len(&self) -> usize[src]

pub fn trace(&self) -> &Vec<(RcStr, usize)>[src]

pub fn translated_trace(&mut self) -> Vec<(SourceName, usize, Option<RcStr>)>[src]

pub fn trace_fmt(&'a mut self) -> impl Display + 'a[src]

pub fn trace_str(&mut self) -> String[src]

pub fn new_exc_kind(
    &mut self,
    base: Rc<ExceptionKind>,
    name: RcStr,
    message: RcStr,
    fields: Option<Vec<RcStr>>
) -> Rc<ExceptionKind>
[src]

pub fn builtin_exceptions(&self) -> &BuiltinExceptions[src]

pub fn exc_occurred(&self) -> bool[src]

pub fn exc_move(&mut self) -> Exception[src]

pub fn set_exc<T>(&mut self, exc: Exception) -> Result<T, ErrorIndicator>[src]

pub fn set_exc_other<T>(&mut self, message: RcStr) -> Result<T, ErrorIndicator>[src]

pub fn set_exc_str<T>(&mut self, message: &str) -> Result<T, ErrorIndicator>[src]

pub fn set_exc_legacy<T>(
    &mut self,
    error: EvalError
) -> Result<T, ErrorIndicator>
[src]

pub fn set_kind_error<T>(
    &mut self,
    expected: ValueKind,
    got: ValueKind
) -> Result<T, ErrorIndicator>
[src]

pub fn set_name_error<T>(&mut self, name: RcStr) -> Result<T, ErrorIndicator>[src]

pub fn set_operand_type_error<T>(
    &mut self,
    operator: &str,
    operands: Vec<&Value>
) -> Result<T, ErrorIndicator>
[src]

pub fn set_static_attr_error<T>(
    &mut self,
    attr: Symbol,
    cls: Value
) -> Result<T, ErrorIndicator>
[src]

pub fn set_key_error<T>(&mut self, message: &RcStr) -> Result<T, ErrorIndicator>[src]

pub fn set_empty_pop_error<T>(&mut self) -> Result<T, ErrorIndicator>[src]

pub fn set_assert_error<T>(
    &mut self,
    message: &RcStr
) -> Result<T, ErrorIndicator>
[src]

pub fn set_os_error<T>(&mut self, message: &RcStr) -> Result<T, ErrorIndicator>[src]

pub fn set_io_error<T>(&mut self, error: Error) -> Result<T, ErrorIndicator>[src]

pub fn set_utf8_error<T>(
    &mut self,
    error: Utf8Error
) -> Result<T, ErrorIndicator>
[src]

pub fn builtins(&self) -> &HashMap<RcStr, Value, RandomState>[src]

pub fn builtin_classes(&self) -> &BuiltinClasses[src]

pub fn add_source_root(&mut self, root: RcPath)[src]

pub fn add_source_roots_from_path_str(&mut self, roots: &str)[src]

pub fn add_roots_from_env(&mut self) -> Result<(), VarError>[src]

pub fn add_embedded_source(&mut self, module_name: RcStr, data: &'static str)[src]

pub fn add_native_module<F>(&mut self, name: RcStr, f: F) where
    F: FnOnce(&mut Globals) -> Result<GMap<(), RcStr, Rc<RefCell<Value>>, DefaultEqF<RcStr>, DefaultHashF<RcStr>, ()>, ErrorIndicator> + 'static, 
[src]

pub fn add_file_as_module(
    &mut self,
    name: RcStr,
    path: RcPath
) -> Result<(), Error>
[src]

pub fn set_cli_args(&mut self, args: Vec<RcStr>)[src]

pub fn load_by_symbol(
    &mut self,
    symbol: Symbol
) -> Result<Rc<Module>, ErrorIndicator>
[src]

pub fn load_by_str(&mut self, s: &str) -> Result<Rc<Module>, ErrorIndicator>[src]

pub fn load(&mut self, name: &RcStr) -> Result<Rc<Module>, ErrorIndicator>[src]

pub fn load_main(&mut self) -> Result<(), ErrorIndicator>[src]

pub fn exec_module(
    &mut self,
    name: RcStr,
    filename: Option<RcPath>,
    code: RcStr
) -> Result<Rc<Module>, ErrorIndicator>
[src]

pub fn lex(
    &self,
    s: &'a str
) -> Result<(Vec<Token<'a>>, Vec<(usize, usize)>), LexError>
[src]

pub fn parse(
    &mut self,
    name: RcStr,
    s: &str
) -> Result<Expression, ErrorIndicator>
[src]

pub fn symbol_registry(&self) -> &SymbolRegistryHandle[src]

pub fn intern_rcstr(&mut self, s: &RcStr) -> Symbol[src]

pub fn intern_str(&mut self, s: &str) -> Symbol[src]

pub fn symbol_rcstr(&self, s: Symbol) -> RcStr[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.