Struct repl_framework::Interpreter[][src]

pub struct Interpreter {
    pub data: HashMap<String, Arc<dyn Any>>,
    // some fields omitted
}

the interpreter struct that contains all logic and code for interpreter creation

Fields

data: HashMap<String, Arc<dyn Any>>

Implementations

impl Interpreter[src]

pub fn new() -> Interpreter[src]

create a new blank interpreter

pub fn from_repl(repl: Repl) -> Interpreter[src]

create an interpreter from a repl

pub fn add_function(
    &mut self,
    name: String,
    function: fn(_: HashMap<String, Arc<dyn Any>>, _: Vec<String>)
)
[src]

add a function to an interpreter

pub fn run(&self, filename: &str)[src]

run the interpreter

pub fn run_debug(&self, filename: &str)[src]

Auto Trait Implementations

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.