pub enum ZstdDictDiscoveryError {
InvalidHash {
hash: String,
},
NotFound {
url: String,
},
HashMismatch {
url: String,
expected: String,
actual: String,
},
Http {
url: String,
source: Error,
},
}Expand description
Errors raised by the v0.5 zstd-dictionary discovery surface.
The discovery path is hard-fail by design (no silent fallback to identity
bytes) — see spec/WELL_KNOWN_DISCOVERY.md § Resolution failures. Silent
dict-load failure was the v0.4.1 sglang COPY-dicts regression class this
surface eliminates.
Variants§
InvalidHash
Hash input was not sha256:<64 hex> or bare <64 hex>.
NotFound
.well-known/codec/dicts/<hex>.zstd returned HTTP 404.
HashMismatch
Fetched bytes did not hash to the <hex> path component in the URL.
Treat as byte-tampering: never decompress.
Http
HTTP transport-layer failure (reqwest). Surfaced separately from 404 so callers can distinguish “origin doesn’t publish this dict” from “we couldn’t reach the origin at all.”
Trait Implementations§
Source§impl Debug for ZstdDictDiscoveryError
impl Debug for ZstdDictDiscoveryError
Source§impl Display for ZstdDictDiscoveryError
impl Display for ZstdDictDiscoveryError
Source§impl Error for ZstdDictDiscoveryError
impl Error for ZstdDictDiscoveryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ZstdDictDiscoveryError
impl !RefUnwindSafe for ZstdDictDiscoveryError
impl Send for ZstdDictDiscoveryError
impl Sync for ZstdDictDiscoveryError
impl Unpin for ZstdDictDiscoveryError
impl UnsafeUnpin for ZstdDictDiscoveryError
impl !UnwindSafe for ZstdDictDiscoveryError
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
Mutably borrows from an owned value. Read more