pub enum BinaryError {
Show 16 variants
Io(Error),
InvalidFormat(String),
UnsupportedVersion(String),
UnsupportedCompression(String),
DecompressionFailed(String),
InvalidData(String),
ParseError(String),
NotEnoughData {
expected: usize,
actual: usize,
},
InvalidSignature {
expected: String,
actual: String,
},
Unsupported(String),
MemoryError(String),
Timeout(String),
ResourceLimitExceeded(String),
CorruptedData(String),
VersionCompatibility(String),
Generic(String),
}Expand description
Errors that can occur during Unity binary parsing
Variants§
Io(Error)
I/O errors
InvalidFormat(String)
Invalid file format
UnsupportedVersion(String)
Unsupported file version
UnsupportedCompression(String)
Unsupported compression format
DecompressionFailed(String)
Decompression failed
InvalidData(String)
Invalid data
ParseError(String)
Parsing error
NotEnoughData
Not enough data
InvalidSignature
Invalid signature
Unsupported(String)
Unsupported feature
MemoryError(String)
Memory allocation error
Timeout(String)
Timeout error
ResourceLimitExceeded(String)
Resource limit exceeded
CorruptedData(String)
Corrupted data
VersionCompatibility(String)
Version compatibility error
Generic(String)
Generic error with context
Implementations§
Source§impl BinaryError
impl BinaryError
Sourcepub fn invalid_format<S>(msg: S) -> BinaryError
pub fn invalid_format<S>(msg: S) -> BinaryError
Create a new invalid format error
Sourcepub fn format<S>(msg: S) -> BinaryError
pub fn format<S>(msg: S) -> BinaryError
Create a generic error (for compatibility)
Sourcepub fn unsupported_version<S>(version: S) -> BinaryError
pub fn unsupported_version<S>(version: S) -> BinaryError
Create a new unsupported version error
Sourcepub fn unsupported_compression<S>(compression: S) -> BinaryError
pub fn unsupported_compression<S>(compression: S) -> BinaryError
Create a new unsupported compression error
Sourcepub fn decompression_failed<S>(msg: S) -> BinaryError
pub fn decompression_failed<S>(msg: S) -> BinaryError
Create a new decompression failed error
Sourcepub fn invalid_data<S>(msg: S) -> BinaryError
pub fn invalid_data<S>(msg: S) -> BinaryError
Create a new invalid data error
Sourcepub fn parse_error<S>(msg: S) -> BinaryError
pub fn parse_error<S>(msg: S) -> BinaryError
Create a new parse error
Sourcepub fn not_enough_data(expected: usize, actual: usize) -> BinaryError
pub fn not_enough_data(expected: usize, actual: usize) -> BinaryError
Create a new not enough data error
Sourcepub fn invalid_signature<S>(expected: S, actual: S) -> BinaryError
pub fn invalid_signature<S>(expected: S, actual: S) -> BinaryError
Create a new invalid signature error
Sourcepub fn unsupported<S>(feature: S) -> BinaryError
pub fn unsupported<S>(feature: S) -> BinaryError
Create a new unsupported feature error
Sourcepub fn generic<S>(msg: S) -> BinaryError
pub fn generic<S>(msg: S) -> BinaryError
Create a new generic error
Sourcepub fn io_error<S>(msg: S) -> BinaryError
pub fn io_error<S>(msg: S) -> BinaryError
Create a new I/O error (alias for generic)
Source§impl BinaryError
impl BinaryError
Sourcepub fn memory_error(msg: impl Into<String>) -> BinaryError
pub fn memory_error(msg: impl Into<String>) -> BinaryError
Create a memory error
Sourcepub fn timeout(msg: impl Into<String>) -> BinaryError
pub fn timeout(msg: impl Into<String>) -> BinaryError
Create a timeout error
Sourcepub fn corrupted_data(msg: impl Into<String>) -> BinaryError
pub fn corrupted_data(msg: impl Into<String>) -> BinaryError
Create a corrupted data error
Sourcepub fn version_compatibility(msg: impl Into<String>) -> BinaryError
pub fn version_compatibility(msg: impl Into<String>) -> BinaryError
Create a version compatibility error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get error severity level
Sourcepub fn recovery_suggestion(&self) -> Option<&'static str>
pub fn recovery_suggestion(&self) -> Option<&'static str>
Get suggested recovery action
Trait Implementations§
Source§impl Debug for BinaryError
impl Debug for BinaryError
Source§impl Display for BinaryError
impl Display for BinaryError
Source§impl Error for BinaryError
impl Error for BinaryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<DecompressError> for BinaryError
impl From<DecompressError> for BinaryError
Source§fn from(err: DecompressError) -> BinaryError
fn from(err: DecompressError) -> BinaryError
Source§impl From<Error> for BinaryError
impl From<Error> for BinaryError
Source§fn from(source: Error) -> BinaryError
fn from(source: Error) -> BinaryError
Source§impl From<Error> for BinaryError
impl From<Error> for BinaryError
Source§fn from(err: Error) -> BinaryError
fn from(err: Error) -> BinaryError
Source§impl From<FromUtf8Error> for BinaryError
impl From<FromUtf8Error> for BinaryError
Source§fn from(err: FromUtf8Error) -> BinaryError
fn from(err: FromUtf8Error) -> BinaryError
Source§impl From<Utf8Error> for BinaryError
impl From<Utf8Error> for BinaryError
Source§fn from(err: Utf8Error) -> BinaryError
fn from(err: Utf8Error) -> BinaryError
Auto Trait Implementations§
impl Freeze for BinaryError
impl !RefUnwindSafe for BinaryError
impl Send for BinaryError
impl Sync for BinaryError
impl Unpin for BinaryError
impl !UnwindSafe for BinaryError
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
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>
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>
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