pub struct PlanVerifier { /* private fields */ }Expand description
Walk a Plan against an install tree and produce a RepairManifest.
Construct via PlanVerifier::new, optionally override the platform with
PlanVerifier::with_platform, then call PlanVerifier::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 PlanVerifier
impl PlanVerifier
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::with_crc32 to opt into
content-level checks.
§Errors
Surfaces any crate::IndexError::Io produced while opening or
reading an install-tree file, plus
crate::IndexError::UnsupportedPlatform if the plan pins
Platform::Unknown and the install contains SqPack targets.
Auto Trait Implementations§
impl Freeze for PlanVerifier
impl RefUnwindSafe for PlanVerifier
impl Send for PlanVerifier
impl Sync for PlanVerifier
impl Unpin for PlanVerifier
impl UnsafeUnpin for PlanVerifier
impl UnwindSafe for PlanVerifier
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