Expand description
Domain-split error types (ParseError, ApplyError, IndexError, VerifyError).
Error types for parsing, applying, indexing, and verifying ZiPatch streams.
The crate splits failures along the four real domain boundaries rather than presenting a single flat enum:
ParseError— surfaced by the parsing layer (crate::chunkand thecrate::ZiPatchReaderstreaming parser). Pure wire-format concerns: bad magic, unknown tags, CRC mismatches, truncated streams, field invariants.ApplyError— surfaced by the apply layer (crate::apply). WrapsParseErrorbecause the sequential apply driver pulls chunks from acrate::ZiPatchReaderinternally, and adds apply-side concerns: I/O, platform resolution, cancellation, DEFLATE failures.IndexError— surfaced by the indexed pipeline (crate::index). WrapsParseError(plan building parses chunks) and carries index-only concerns: plan-source mismatches, schema versions, unsafe target paths, duplicate-patch chains.VerifyError— surfaced by the verifier (crate::verifyandcrate::index::PlanVerifier). Plan-shape invariants and on-disk content mismatches.
Error is a top-level umbrella that all four From-convert into, for
callers that prefer to handle every failure mode behind one enum.
§Third-party error types
The library does not expose binrw::Error in its public surface — a
binrw parse failure is wrapped as ParseError::Decode, which carries
the field context and message as owned strings. The original
binrw::Error is retained internally but not reachable through
std::error::Error::source.
std::io::Error is kept as a #[source] on the variants that genuinely
wrap one (file open/seek/write failures, parser stream reads), because it
is a standard-library type and callers expect it for I/O operations.
Where the apply or verify layer has the path that failed, the variant
carries an optional std::path::PathBuf alongside the error so the
consumer does not have to reconstruct it.
Enums§
- Apply
Error - Failures produced by the apply layer (
crate::apply). - Error
- Top-level umbrella that every domain error converts into.
- Index
Error - Failures produced by the indexed pipeline (
crate::index). - Parse
Error - Failures produced by the parsing layer (
crate::chunk). - Verify
Error - Failures produced by the verifier (
crate::verifyandcrate::index::PlanVerifier).
Type Aliases§
- Apply
Result Resultalias for apply-layer entry points.- Index
Result Resultalias for indexed-pipeline entry points.- Parse
Result Resultalias for parsing-layer entry points.- Result
- Umbrella
Resultalias keyed on the top-levelErrorenum. - Verify
Result Resultalias for verifier entry points.