[dbg] Add results
This commit is contained in:
21
src/misc/emulator_error.rs
Normal file
21
src/misc/emulator_error.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use std::fmt::Debug;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum DeviceType {
|
||||
RAM,
|
||||
MMU,
|
||||
KEYBOARD,
|
||||
AUDIO,
|
||||
GRAPHICS,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum EmulatorError {
|
||||
AllocationError(DeviceType, &'static str),
|
||||
UnreachableMemoryError(DeviceType, u32),
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1 +1,3 @@
|
||||
pub mod endian;
|
||||
pub mod endian;
|
||||
pub mod emulator_error;
|
||||
pub mod result;
|
3
src/misc/result.rs
Normal file
3
src/misc/result.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
use crate::misc::emulator_error::EmulatorError;
|
||||
|
||||
pub type EmulatorResult<T> = Result<T,EmulatorError>;
|
Reference in New Issue
Block a user