#[non_exhaustive]pub enum AxmlError {
UnexpectedEof,
InvalidMagic(u16),
InvalidChunkType(u16),
InvalidStringIndex(usize, usize),
Utf8Error(FromUtf8Error),
Utf16Error(DecodeUtf16Error),
XmlError(String),
SliceError(String),
ProtoError(DecodeError),
IoError(Error),
}Expand description
Re-export the error type so downstream crates can name it. Error type for AXML and ARSC parsing and manipulation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedEof
Unexpected end of input while reading a required field.
InvalidMagic(u16)
Invalid magic bytes for AXML or ARSC format.
InvalidChunkType(u16)
Invalid chunk type identifier.
InvalidStringIndex(usize, usize)
String index out of bounds (requested index, valid count).
Utf8Error(FromUtf8Error)
UTF-8 decoding error from the string pool.
Utf16Error(DecodeUtf16Error)
UTF-16 decoding error from the string pool.
XmlError(String)
XML parsing or generation error.
SliceError(String)
Slice bounds or format error.
ProtoError(DecodeError)
Protobuf message decoding error.
IoError(Error)
File I/O error.
Trait Implementations§
Source§impl Error for AxmlError
impl Error for AxmlError
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()
Source§impl From<DecodeError> for AxmlError
impl From<DecodeError> for AxmlError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeUtf16Error> for AxmlError
impl From<DecodeUtf16Error> for AxmlError
Source§fn from(e: DecodeUtf16Error) -> Self
fn from(e: DecodeUtf16Error) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for AxmlError
impl From<FromUtf8Error> for AxmlError
Source§fn from(e: FromUtf8Error) -> Self
fn from(e: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AxmlError
impl !RefUnwindSafe for AxmlError
impl Send for AxmlError
impl Sync for AxmlError
impl Unpin for AxmlError
impl !UnwindSafe for AxmlError
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