pub struct Verifier { /* private fields */ }Expand description
Walk a Plan against an install tree and produce a RepairManifest.
Construct via Verifier::new, optionally override the platform with
Verifier::with_platform, then call Verifier::execute with a &Plan.
The plan’s Plan::platform is used by default.
The verifier never writes — it opens files read-only, reads only the
ranges it needs to inspect, and returns a manifest describing what is out
of shape. Pair it with
IndexApplier::execute_with_manifest
to fix only the flagged regions.
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn new(install_root: impl Into<PathBuf>) -> Self
pub fn new(install_root: impl Into<PathBuf>) -> Self
Construct a verifier rooted at install_root.
Sourcepub fn with_platform(self, platform: Platform) -> Self
pub fn with_platform(self, platform: Platform) -> Self
Override the platform pinned on the Plan.
Sourcepub fn execute(self, plan: &Plan) -> Result<RepairManifest>
pub fn execute(self, plan: &Plan) -> Result<RepairManifest>
Verify plan against the install tree.
Returns a RepairManifest describing every target/region that needs
rewriting. An empty manifest (see RepairManifest::is_clean) means
the install matches the plan within the v1 policy: see the
module docs for the per-source check matrix.
§Patch-source caveat
Single-byte damage inside a PartSource::Patch-sourced region is
not detected by default — populate the plan’s regions with
PartExpected::Crc32 via Plan::compute_crc32 to opt into
content-level checks.
§Errors
Surfaces any crate::ZiPatchError::Io produced while opening or
reading an install-tree file, plus
crate::ZiPatchError::UnsupportedPlatform if the plan pins
Platform::Unknown and the install contains SqPack targets.
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnsafeUnpin for Verifier
impl UnwindSafe for Verifier
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more