Trait EmulatorCore

Source
pub trait EmulatorCore {
    type Error: Error + Send + Sync + 'static;
    type Config: JsonSchema + Serialize + DeserializeOwned + Default;

Show 13 methods // Required methods fn core_info() -> &'static CoreInfo; fn try_from_file( data: &[u8], backup: Option<&[u8]>, config: &Self::Config, ) -> Result<Self, Self::Error> where Self: Sized; fn game_info(&self) -> Vec<(String, String)>; fn set_config(&mut self, config: &Self::Config); fn exec_frame(&mut self, render_graphics: bool); fn reset(&mut self); fn frame_buffer(&self) -> &FrameBuffer; fn audio_buffer(&self) -> &AudioBuffer; fn default_key_config() -> KeyConfig; fn set_input(&mut self, input: &InputData); fn backup(&self) -> Option<Vec<u8>>; fn save_state(&self) -> Vec<u8> ; fn load_state(&mut self, data: &[u8]) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn core_info() -> &'static CoreInfo

Source

fn try_from_file( data: &[u8], backup: Option<&[u8]>, config: &Self::Config, ) -> Result<Self, Self::Error>
where Self: Sized,

Source

fn game_info(&self) -> Vec<(String, String)>

Source

fn set_config(&mut self, config: &Self::Config)

Source

fn exec_frame(&mut self, render_graphics: bool)

Source

fn reset(&mut self)

Source

fn frame_buffer(&self) -> &FrameBuffer

Source

fn audio_buffer(&self) -> &AudioBuffer

Source

fn default_key_config() -> KeyConfig

Source

fn set_input(&mut self, input: &InputData)

Source

fn backup(&self) -> Option<Vec<u8>>

Source

fn save_state(&self) -> Vec<u8>

Source

fn load_state(&mut self, data: &[u8]) -> Result<(), Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§