pub enum ArtifactError {
NotFound(String),
BadMagic,
BadVersion(u32),
BadHmac,
HashMismatch {
expected: String,
actual: String,
},
Decompression(String),
Metadata(String),
TooLarge {
actual: usize,
limit: usize,
},
Io,
}Expand description
Errors returned by ArtifactStore implementations.
Io deliberately collapses the inner std::io::Error into a
unit-variant so the type stays PartialEq-able by callers that
match on it; the underlying error is logged at the call site. The
JIT L2 cache uses the same “log + swallow” convention for I/O
failures and treats them as a miss.
Variants§
NotFound(String)
BadMagic
BadVersion(u32)
BadHmac
HashMismatch
Decompression(String)
Metadata(String)
(De)serialisation of an ArtifactMetadata sidecar failed. Carries
the serde error rendered to a string so the variant stays
PartialEq-compatible with the rest of ArtifactError (which
deliberately avoids embedding non-Eq inner error types). Only
reachable through the metadata-aware paths
(DiskArtifactStore::put_with_metadata /
DiskArtifactStore::metadata); the plain put/get round-trip
never touches a sidecar.
TooLarge
Either the payload handed to put exceeded MAX_PAYLOAD_LEN,
or the body handed to get decompressed to more than
MAX_DECOMPRESSED_LEN bytes. Carries the offending size and
the cap that was tripped so operators can tell which side of the
round-trip refused the request. Both fields are usize (i.e.
Eq) so this variant stays compatible with any future
PartialEq derive on ArtifactError.
Io
Trait Implementations§
Source§impl Debug for ArtifactError
impl Debug for ArtifactError
Source§impl Display for ArtifactError
impl Display for ArtifactError
Source§impl Error for ArtifactError
impl Error for ArtifactError
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()