pub struct VerifyResult {
pub intact: Vec<VerifiedFile>,
pub damaged: Vec<DamagedFile>,
pub missing: Vec<MissingFile>,
pub recovery_blocks_available: u32,
pub repair_possible: bool,
}Expand description
Result of verifying a PAR2 file set against actual files on disk.
Fields§
§intact: Vec<VerifiedFile>Files that are intact (MD5 matches).
damaged: Vec<DamagedFile>Files that are damaged (exist but MD5 doesn’t match).
missing: Vec<MissingFile>Files that are missing entirely.
recovery_blocks_available: u32Total number of recovery blocks available in the PAR2 set.
repair_possible: boolWhether repair is theoretically possible (enough recovery blocks).
Implementations§
Source§impl VerifyResult
impl VerifyResult
Sourcepub fn all_correct(&self) -> bool
pub fn all_correct(&self) -> bool
Returns true if all files are intact.
Sourcepub fn blocks_needed(&self) -> u32
pub fn blocks_needed(&self) -> u32
Total number of damaged/missing blocks that need repair.
Trait Implementations§
Source§impl Debug for VerifyResult
impl Debug for VerifyResult
Auto Trait Implementations§
impl Freeze for VerifyResult
impl RefUnwindSafe for VerifyResult
impl Send for VerifyResult
impl Sync for VerifyResult
impl Unpin for VerifyResult
impl UnsafeUnpin for VerifyResult
impl UnwindSafe for VerifyResult
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