Returns the storage subsystem that will be used for the machine.
(&mut self)
| 454 | |
| 455 | /// Returns the storage subsystem that will be used for the machine. |
| 456 | pub fn get_storage(&mut self) -> Rc<RefCell<storage::Storage>> { |
| 457 | if self.storage.is_none() { |
| 458 | self.storage = Some(Rc::from(RefCell::from(storage::Storage::default()))); |
| 459 | } |
| 460 | self.storage.clone().unwrap() |
| 461 | } |
| 462 | |
| 463 | /// Overrides the default stored program with the given one. |
| 464 | pub fn with_program(mut self, program: Rc<RefCell<dyn program::Program>>) -> Self { |
no outgoing calls