pub struct InstallationVerifier { /* private fields */ }Expand description
Manages Minecraft installation verification and integrity checks.
This struct owns the primary data structures needed for verifying a Minecraft installation, including the installation path, instance configuration, and game resources. It serves as the central component for performing comprehensive verification operations on Minecraft installations.
§Example Usage
Basic verification workflow:
ⓘ
let verifier = InstallationVerifier::new(minecraft_path);
let result = verifier.verify_version();
if result.is_valid() {
println!("Installation is valid!");
} else {
println!("Found problems: {}", result.total_problems());
}Implementations§
Source§impl InstallationVerifier
impl InstallationVerifier
pub async fn new(minecraft_dir: &Path, version_id: &str) -> Result<Self>
Sourcepub fn verify(&self) -> VersionCheckResult<'_>
pub fn verify(&self) -> VersionCheckResult<'_>
Performs a comprehensive verification of the Minecraft installation.
Verifies both libraries and objects in the installation and returns references to any problematic files found.
§Returns
A VersionCheckResult containing references to any problematic
libraries and objects found during verification. If the installation
is completely valid, both arrays in the result will be empty.
§Example
ⓘ
let mut verifier = InstallationVerifier::new(minecraft_path);
let result = verifier.verify();
if result.is_valid() {
println!("Installation verified successfully!");
} else {
println!("Verification failed: {}", result.summary());
}Auto Trait Implementations§
impl Freeze for InstallationVerifier
impl RefUnwindSafe for InstallationVerifier
impl Send for InstallationVerifier
impl Sync for InstallationVerifier
impl Unpin for InstallationVerifier
impl UnsafeUnpin for InstallationVerifier
impl UnwindSafe for InstallationVerifier
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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