pub enum CodecZstdDictError {
MissingHeader,
MalformedHash(String),
UnknownHash(String),
}Expand description
Raised when the server’s Codec-Zstd-Dict header doesn’t match any
dict the client has loaded, or is missing on a zstd response.
A wrong-dict decompression would produce garbage bytes that downstream parsers would misinterpret — fail fast instead.
Variants§
MissingHeader
Response was Content-Encoding: zstd but the server omitted
the Codec-Zstd-Dict header. Per spec/PROTOCOL.md the server
MUST name the dict it used; we refuse to guess.
MalformedHash(String)
Codec-Zstd-Dict value was not in the canonical
sha256:<64 hex chars> shape. The wrapped string is the raw
header value (trimmed) for diagnostics.
UnknownHash(String)
Codec-Zstd-Dict named a dict we haven’t loaded. The caller
should fetch it from the tokenizer map’s zstd_dictionaries[]
entry (the one whose hash matches) or retry the request with
Accept-Encoding: gzip to downgrade to a no-dict path. The
wrapped string is the declared hash.
Trait Implementations§
Source§impl Clone for CodecZstdDictError
impl Clone for CodecZstdDictError
Source§fn clone(&self) -> CodecZstdDictError
fn clone(&self) -> CodecZstdDictError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecZstdDictError
impl Debug for CodecZstdDictError
Source§impl Display for CodecZstdDictError
impl Display for CodecZstdDictError
Source§impl Error for CodecZstdDictError
impl Error for CodecZstdDictError
1.30.0 · 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()
Source§impl PartialEq for CodecZstdDictError
impl PartialEq for CodecZstdDictError
Source§fn eq(&self, other: &CodecZstdDictError) -> bool
fn eq(&self, other: &CodecZstdDictError) -> bool
self and other values to be equal, and is used by ==.