pub enum UxieError {
Io(Error),
Json(Error),
Yaml(Error),
InvalidFormat {
message: String,
},
NotFound {
resource_type: &'static str,
id: String,
},
OutOfBounds {
resource_type: &'static str,
id: u32,
max: u32,
},
ProjectDetectionFailed {
path: PathBuf,
},
GameDetectionFailed,
SymbolResolutionFailed {
name: String,
},
MissingRequired {
item_type: &'static str,
path: PathBuf,
},
}Expand description
Unified error type for all Uxie operations
This enum covers all error conditions that can occur during:
- File I/O operations
- Binary format parsing (NARC, ARM9, ROM headers)
- JSON/YAML configuration parsing
- Symbol resolution
- Project detection and loading
Variants§
Io(Error)
I/O error (file not found, permission denied, etc.)
Json(Error)
JSON parsing/serialization error
Yaml(Error)
YAML parsing/serialization error
InvalidFormat
Invalid binary format (wrong magic bytes, corrupted data, etc.)
NotFound
Resource not found (map header, script, text bank, etc.)
Fields
OutOfBounds
Index out of bounds
Fields
ProjectDetectionFailed
Project detection failed
GameDetectionFailed
Game detection failed
SymbolResolutionFailed
Symbol resolution failed
MissingRequired
Missing required file or directory
Implementations§
Source§impl UxieError
impl UxieError
Sourcepub fn invalid_format(message: impl Into<String>) -> Self
pub fn invalid_format(message: impl Into<String>) -> Self
Create an InvalidFormat error with a message
Sourcepub fn not_found(resource_type: &'static str, id: impl Into<String>) -> Self
pub fn not_found(resource_type: &'static str, id: impl Into<String>) -> Self
Create a NotFound error
Sourcepub fn out_of_bounds(resource_type: &'static str, id: u32, max: u32) -> Self
pub fn out_of_bounds(resource_type: &'static str, id: u32, max: u32) -> Self
Create an OutOfBounds error
Sourcepub fn missing_file(path: impl Into<PathBuf>) -> Self
pub fn missing_file(path: impl Into<PathBuf>) -> Self
Create a MissingRequired error
Sourcepub fn missing_directory(path: impl Into<PathBuf>) -> Self
pub fn missing_directory(path: impl Into<PathBuf>) -> Self
Create a MissingRequired error for directories
Trait Implementations§
Source§impl Error for UxieError
impl Error for UxieError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for UxieError
impl !RefUnwindSafe for UxieError
impl Send for UxieError
impl Sync for UxieError
impl Unpin for UxieError
impl !UnwindSafe for UxieError
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> CustomError for T
impl<T> CustomError for T
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