pub enum CrushError {
Plugin(PluginError),
Timeout(TimeoutError),
Validation(ValidationError),
Io(Error),
Cancelled,
InvalidConfig(String),
VersionMismatch {
file_version: String,
current_version: String,
},
InvalidFormat(String),
ChecksumMismatch {
block_index: u64,
expected: u32,
actual: u32,
},
ExpansionLimitExceeded {
block_index: u64,
},
IndexCorrupted(String),
}Expand description
Main error type for Crush library operations
Variants§
Plugin(PluginError)
Plugin-related errors (registration, discovery, execution)
Timeout(TimeoutError)
Timeout-related errors (plugin operations exceeding limits)
Validation(ValidationError)
Validation errors (invalid input, corrupted data, malformed headers)
Io(Error)
I/O errors (file operations, network, etc.)
Cancelled
Operation was cancelled by user (Ctrl+C) or programmatically
InvalidConfig(String)
Configuration validation failed (e.g. block_size out of range)
VersionMismatch
The compressed file was produced by a different engine version. Decompression is refused; the user must use the named producer version.
Fields
InvalidFormat(String)
File header magic bytes do not match the expected CRSH signature.
ChecksumMismatch
A block’s CRC32 checksum does not match the stored value.
Fields
ExpansionLimitExceeded
Decompressed output would exceed the caller’s configured expansion limit.
IndexCorrupted(String)
The block index is missing, corrupted, or truncated.
Implementations§
Source§impl CrushError
impl CrushError
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if this error represents a user-initiated or
programmatic cancellation (distinct from a compression failure).
Trait Implementations§
Source§impl Debug for CrushError
impl Debug for CrushError
Source§impl Display for CrushError
impl Display for CrushError
Source§impl Error for CrushError
impl Error for CrushError
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
use the Display impl or to_string()