Lazily initializes the `console` field with a default value and returns it.
(&mut self)
| 356 | |
| 357 | /// Lazily initializes the `console` field with a default value and returns it. |
| 358 | pub fn get_console(&mut self) -> Rc<RefCell<dyn console::Console>> { |
| 359 | if self.console.is_none() { |
| 360 | self.console = Some(Rc::from(RefCell::from(console::TrivialConsole::default()))); |
| 361 | } |
| 362 | self.console.clone().unwrap() |
| 363 | } |
| 364 | |
| 365 | /// Lazily initializes the `datetime` field with a default value and returns it. |
| 366 | pub fn get_datetime(&mut self) -> Rc<dyn datetime::DateTime> { |
no outgoing calls