Struct endbasic_std::InteractiveMachineBuilder
source · pub struct InteractiveMachineBuilder { /* private fields */ }
Expand description
Builder pattern to construct an interpreter for REPL operation.
This is a superset of a ScriptingMachineBuilder
.
Unless otherwise specified, the interpreter is connected to an in-memory drive and to a stored program that can be edited interactively.
Implementations§
source§impl InteractiveMachineBuilder
impl InteractiveMachineBuilder
sourcepub fn get_console(&mut self) -> Rc<RefCell<dyn Console>>
pub fn get_console(&mut self) -> Rc<RefCell<dyn Console>>
Returns the console that will be used for the machine.
sourcepub fn get_program(&mut self) -> Rc<RefCell<dyn Program>>
pub fn get_program(&mut self) -> Rc<RefCell<dyn Program>>
Lazily initializes the program
field with a default value and returns it.
sourcepub fn get_storage(&mut self) -> Rc<RefCell<Storage>>
pub fn get_storage(&mut self) -> Rc<RefCell<Storage>>
Returns the storage subsystem that will be used for the machine.
sourcepub fn with_program(self, program: Rc<RefCell<dyn Program>>) -> Self
pub fn with_program(self, program: Rc<RefCell<dyn Program>>) -> Self
Overrides the default stored program with the given one.