Trait libnoentiendo::systems::System
source · pub trait System {
// Required methods
fn get_cpu_mut(&mut self) -> Box<&mut dyn Cpu>;
fn tick(&mut self) -> Duration;
fn reset(&mut self);
fn render(&mut self, framebuffer: &mut [u8], window: WindowConfig);
// Provided methods
fn attach_trace_handler(&mut self, handler: Box<dyn TraceHandler>) { ... }
fn cleanup(&mut self) -> Result<(), &str> { ... }
}
Expand description
A representation of an emulated system.
Required Methods§
sourcefn get_cpu_mut(&mut self) -> Box<&mut dyn Cpu>
fn get_cpu_mut(&mut self) -> Box<&mut dyn Cpu>
Return a mutable reference to the CPU used in this system.
sourcefn render(&mut self, framebuffer: &mut [u8], window: WindowConfig)
fn render(&mut self, framebuffer: &mut [u8], window: WindowConfig)
Render the current state of the system to the given framebuffer.