pub struct Emulator<A: AudioDriver, R: Renderer> { /* private fields */ }
Implementations§
Source§impl<A: AudioDriver, R: Renderer> Emulator<A, R>
impl<A: AudioDriver, R: Renderer> Emulator<A, R>
pub fn new(rom_bytes: &[u8], audio_driver: A, renderer: R) -> Self
pub fn get_cartridge_info(&self) -> &CartridgeInfo
pub fn get_state(&self) -> Result<Vec<u8>, String>
pub fn load_state(&mut self, buffer: &[u8])
pub fn set_tile_atlas_rendering_enabled(&mut self, enabled: bool)
pub fn set_object_atlas_rendering_enabled(&mut self, enabled: bool)
pub fn is_paused(&self) -> bool
pub fn set_paused(&mut self, paused: bool)
pub fn cpu_info(&self) -> CPUInfo
pub fn get_instruction_label(self, address: u16) -> String
pub fn get_object(&self, object_index: u8) -> OAMObject
pub fn tick(&mut self)
pub fn execute_machine_cycle(&mut self)
pub fn run_for_nanos(&mut self, nanos: u64)
Auto Trait Implementations§
impl<A, R> Freeze for Emulator<A, R>
impl<A, R> !RefUnwindSafe for Emulator<A, R>
impl<A, R> !Send for Emulator<A, R>
impl<A, R> !Sync for Emulator<A, R>
impl<A, R> Unpin for Emulator<A, R>
impl<A, R> !UnwindSafe for Emulator<A, R>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more