Skip to main content

Module error

Module error 

Source
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:

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§

ApplyError
Failures produced by the apply layer (crate::apply).
Error
Top-level umbrella that every domain error converts into.
IndexError
Failures produced by the indexed pipeline (crate::index).
ParseError
Failures produced by the parsing layer (crate::chunk).
VerifyError
Failures produced by the verifier (crate::verify and crate::index::PlanVerifier).

Type Aliases§

ApplyResult
Result alias for apply-layer entry points.
IndexResult
Result alias for indexed-pipeline entry points.
ParseResult
Result alias for parsing-layer entry points.
Result
Umbrella Result alias keyed on the top-level Error enum.
VerifyResult
Result alias for verifier entry points.