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§
type Error: Error + Send + Sync + 'static
type Config: JsonSchema + Serialize + DeserializeOwned + Default
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>
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.