#[non_exhaustive]pub enum BundleError {
Zstd(String),
Tar(String),
Manifest(String),
UnsupportedVersion {
found: u32,
max: u32,
},
Events(String),
HashMismatch {
expected: String,
actual: String,
},
MissingBlob(String),
IntegrityMismatch,
}Expand description
Portable session bundle (hh-core::bundle) build/parse error. Every
variant here is reachable from untrusted input (hh import file.hh) and
must carry enough detail to act on — “corrupt bundle” alone is not
actionable (v1.0.0 addendum: parsers over untrusted input must never
panic and must report precisely what failed).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Zstd(String)
The bundle’s zstd stream could not be decompressed.
Tar(String)
The decompressed bundle is not a valid tar archive, or contains an
entry outside the allow-list (unexpected path, symlink, hardlink,
absolute path, or .. component).
Manifest(String)
manifest.json is missing, unreadable, or not valid JSON.
UnsupportedVersion
The bundle’s format_version is newer than this build of hh
understands.
Fields
Events(String)
events.ndjson is missing or one of its lines is not valid JSON.
HashMismatch
A blob’s actual content hash did not match its expected hash (from its tar path or from an event/file_change reference).
MissingBlob(String)
An event or file_change references a blob hash that the bundle does not carry.
IntegrityMismatch
The bundle’s events.ndjson digest did not match manifest.integrity.
Trait Implementations§
Source§impl Debug for BundleError
impl Debug for BundleError
Source§impl Display for BundleError
impl Display for BundleError
Source§impl Error for BundleError
impl Error for BundleError
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()