pub enum M2Error {
Show 17 variants
Io(Error),
InvalidMagic {
expected: String,
actual: String,
},
UnsupportedVersion(String),
ParseError(String),
ValidationError(String),
ConversionError {
from: u32,
to: u32,
reason: String,
},
ChunkError(String),
ReferenceError(String),
InternalError(String),
AnimFormatError(String),
LegacyAnimError(String),
AnimConversionError {
from: AnimFormat,
to: AnimFormat,
reason: String,
},
InvalidMagicBytes([u8; 4]),
MissingMD21Chunk,
MalformedChunk,
UnknownFileDataId(u32),
ExternalFileError(String),
}Expand description
Error types for M2 model parsing and processing
Variants§
Io(Error)
I/O Error during reading or writing
InvalidMagic
Invalid magic number in the file header
UnsupportedVersion(String)
Unsupported file version
ParseError(String)
Error during parsing
ValidationError(String)
Error during validation
ConversionError
Error during version conversion
ChunkError(String)
Chunk error: missing expected chunk or invalid chunk
ReferenceError(String)
Reference error: invalid reference in the file
InternalError(String)
Internal error: something went wrong in the parser logic
AnimFormatError(String)
ANIM format detection failed
LegacyAnimError(String)
Legacy ANIM parsing error
AnimConversionError
ANIM format conversion error
InvalidMagicBytes([u8; 4])
Invalid magic bytes in chunked format
MissingMD21Chunk
Missing required MD21 chunk
MalformedChunk
Malformed chunk header
UnknownFileDataId(u32)
Unknown FileDataID
ExternalFileError(String)
Failed to resolve external file
Trait Implementations§
Source§impl Error for M2Error
impl Error for M2Error
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 M2Error
impl !RefUnwindSafe for M2Error
impl Send for M2Error
impl Sync for M2Error
impl Unpin for M2Error
impl !UnwindSafe for M2Error
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> 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