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: Into<String>>(msg: S) -> Self
pub fn invalid_format<S: Into<String>>(msg: S) -> Self
Create a new invalid format error
Sourcepub fn unsupported_version<S: Into<String>>(version: S) -> Self
pub fn unsupported_version<S: Into<String>>(version: S) -> Self
Create a new unsupported version error
Sourcepub fn unsupported_compression<S: Into<String>>(compression: S) -> Self
pub fn unsupported_compression<S: Into<String>>(compression: S) -> Self
Create a new unsupported compression error
Sourcepub fn decompression_failed<S: Into<String>>(msg: S) -> Self
pub fn decompression_failed<S: Into<String>>(msg: S) -> Self
Create a new decompression failed error
Sourcepub fn invalid_data<S: Into<String>>(msg: S) -> Self
pub fn invalid_data<S: Into<String>>(msg: S) -> Self
Create a new invalid data error
Sourcepub fn parse_error<S: Into<String>>(msg: S) -> Self
pub fn parse_error<S: Into<String>>(msg: S) -> Self
Create a new parse error
Sourcepub fn not_enough_data(expected: usize, actual: usize) -> Self
pub fn not_enough_data(expected: usize, actual: usize) -> Self
Create a new not enough data error
Sourcepub fn invalid_signature<S: Into<String>>(expected: S, actual: S) -> Self
pub fn invalid_signature<S: Into<String>>(expected: S, actual: S) -> Self
Create a new invalid signature error
Sourcepub fn unsupported<S: Into<String>>(feature: S) -> Self
pub fn unsupported<S: Into<String>>(feature: S) -> Self
Create a new unsupported feature error
Source§impl BinaryError
impl BinaryError
Sourcepub fn memory_error(msg: impl Into<String>) -> Self
pub fn memory_error(msg: impl Into<String>) -> Self
Create a memory error
Sourcepub fn corrupted_data(msg: impl Into<String>) -> Self
pub fn corrupted_data(msg: impl Into<String>) -> Self
Create a corrupted data error
Sourcepub fn version_compatibility(msg: impl Into<String>) -> Self
pub fn version_compatibility(msg: impl Into<String>) -> Self
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