pub enum FafbError {
Show 13 variants
InvalidMagic(u32),
IncompatibleVersion {
expected: u8,
actual: u8,
},
ChecksumMismatch {
expected: u32,
actual: u32,
},
FileTooSmall {
expected: usize,
actual: usize,
},
InvalidSectionTableOffset {
offset: u32,
file_size: u32,
},
TooManySections {
count: u16,
max: u16,
},
Io(Error),
SizeMismatch {
header_size: u32,
actual_size: usize,
},
StringTableIndexOutOfBounds {
index: u8,
count: u16,
},
StringTableEntryTooLong {
length: usize,
max: usize,
},
StringTableFull {
max: usize,
},
MissingStringTable,
InvalidUtf8(String),
}Expand description
Errors that can occur when working with .fafb files
Variants§
InvalidMagic(u32)
Invalid magic number - not a FAFB file
IncompatibleVersion
Incompatible major version
ChecksumMismatch
Checksum mismatch - file may be corrupted
FileTooSmall
File too small to contain valid header
InvalidSectionTableOffset
Section table offset points outside file bounds
TooManySections
Section count exceeds maximum allowed
Io(Error)
IO error during read/write
SizeMismatch
Total size in header doesn’t match actual data
StringTableIndexOutOfBounds
String table index out of bounds
StringTableEntryTooLong
String table entry exceeds maximum length
StringTableFull
String table is full (256 entries max)
MissingStringTable
Missing string table section in v2 file
InvalidUtf8(String)
Invalid UTF-8 in string table
Trait Implementations§
Source§impl Error for FafbError
impl Error for FafbError
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 FafbError
impl !RefUnwindSafe for FafbError
impl Send for FafbError
impl Sync for FafbError
impl Unpin for FafbError
impl UnsafeUnpin for FafbError
impl !UnwindSafe for FafbError
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