MCPcopy Index your code
hub / github.com/endbasic/endbasic / get_console

Method get_console

std/src/lib.rs:358–363  ·  view source on GitHub ↗

Lazily initializes the `console` field with a default value and returns it.

(&mut self)

Source from the content-addressed store, hash-verified

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> {

Callers 15

test_disasm_pagingFunction · 0.45
test_list_pagingFunction · 0.45
tester_withFunction · 0.45
test_help_pagingFunction · 0.45
buildMethod · 0.45
test_locate_errorsFunction · 0.45
test_scrcolsFunction · 0.45
test_scrrowsFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_disasm_pagingFunction · 0.36
test_list_pagingFunction · 0.36
test_help_pagingFunction · 0.36
test_locate_errorsFunction · 0.36
test_scrcolsFunction · 0.36
test_scrrowsFunction · 0.36
test_gfx_heightFunction · 0.36
test_gfx_peek_okFunction · 0.36
test_gfx_widthFunction · 0.36