#[non_exhaustive]pub enum DetectError {
Allocator(AllocError),
Unterminated,
UnterminatedStream,
Gzip(Arc<str>),
GzipCrc {
detail: Arc<str>,
expected: u32,
actual: u32,
},
InflateLimit(LimitError),
Work(LimitError),
}Expand description
Why detection raised (the dump’s "detect" error kind).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Allocator(AllocError)
A host allocator refusal during detection.
Unterminated
A file of exactly 20 bytes with no NUL in them, read by the memory
reader (bytes; from a path the stream reader’s rule never raises
here, check_file_type_with_reader).
UnterminatedStream
A positioned stream’s signature read starts past EOF.
Gzip(Arc<str>)
A 1f 8b file whose stream does not decompress in full.
GzipCrc
CRC mismatch, retaining the canonical core message and its original
allocation. Consumers that expose CPython’s exception can render the
two checksums without lengthening the cached core message.
Fields
InflateLimit(LimitError)
The gzip stream inflates past Limits::max_inflate: a
LimitKind::Inflate refusal, whose value is what the stream had
inflated to when it was refused, so its text is every limit
refusal’s, limit Inflate: <value> > <max>.
Work(LimitError)
check_entry_type: the open’s work allowance
(Limits::max_decode_work) ran out while a gzip stream inflated,
or had run out before it; a LimitKind::DecodeWork limit, whose text
is limit DecodeWork: <value> > <max>.
Trait Implementations§
Source§impl Clone for DetectError
impl Clone for DetectError
Source§impl Debug for DetectError
impl Debug for DetectError
Source§impl Display for DetectError
impl Display for DetectError
impl Eq for DetectError
Source§impl Error for DetectError
impl Error for DetectError
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()