pub enum IrError {
Show 14 variants
BufferTooShort {
expected: usize,
actual: usize,
},
BadMagic([u8; 4]),
UnsupportedVersion(u16),
SectionOutOfBounds {
section: usize,
offset: u32,
size: u32,
file_len: usize,
},
InvalidOpcode(u8),
InvalidSlotType(u8),
InvalidIslandTrigger(u8),
InvalidPropsMode(u8),
InvalidSlotSource(u8),
StringIndexOutOfBounds {
index: u32,
len: usize,
},
InvalidUtf8(String),
ListDepthExceeded {
max: u8,
},
IslandNotFound(u16),
JsonParseError(String),
}Expand description
Errors that can occur when parsing FMIR binary data.
Variants§
BufferTooShort
Input buffer is too short to contain the expected structure.
BadMagic([u8; 4])
Magic bytes do not match “FMIR”.
UnsupportedVersion(u16)
IR version is not supported.
SectionOutOfBounds
A section extends beyond the file boundary.
InvalidOpcode(u8)
An opcode byte does not map to a known opcode.
InvalidSlotType(u8)
A slot-type byte does not map to a known slot type.
InvalidIslandTrigger(u8)
An island-trigger byte does not map to a known trigger.
InvalidPropsMode(u8)
A props-mode byte does not map to a known mode.
InvalidSlotSource(u8)
A slot-source byte does not map to a known source.
StringIndexOutOfBounds
A string index is out of bounds.
InvalidUtf8(String)
A byte sequence is not valid UTF-8.
ListDepthExceeded
Nested LIST depth exceeded the maximum allowed.
IslandNotFound(u16)
An island with the given id was not found in the island table.
JsonParseError(String)
Failed to parse JSON input.
Trait Implementations§
Source§impl Error for IrError
impl Error for IrError
1.30.0 · 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()
impl Eq for IrError
impl StructuralPartialEq for IrError
Auto Trait Implementations§
impl Freeze for IrError
impl RefUnwindSafe for IrError
impl Send for IrError
impl Sync for IrError
impl Unpin for IrError
impl UnsafeUnpin for IrError
impl UnwindSafe for IrError
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