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.
Auto Trait Implementations§
impl Freeze for InteractiveMachineBuilder
impl !RefUnwindSafe for InteractiveMachineBuilder
impl !Send for InteractiveMachineBuilder
impl !Sync for InteractiveMachineBuilder
impl !Unpin for InteractiveMachineBuilder
impl !UnwindSafe for InteractiveMachineBuilder
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