#[non_exhaustive]pub enum ExternalCarryError {
UnknownFile {
file_id: FileId,
},
DuplicateFile {
file_id: FileId,
},
UncoveredFile {
file_id: FileId,
},
SliceCountMismatch {
file_id: FileId,
expected: usize,
supplied: usize,
},
DamagedCountMismatch {
file_id: FileId,
declared: u32,
actual: u32,
},
IncompleteCompleteFile {
file_id: FileId,
},
MissingFileWithContent {
file_id: FileId,
},
UnfingerprintedFile {
file_id: FileId,
},
RelocatedFile {
file_id: FileId,
},
Set(Par2Error),
}Expand description
Why a host’s verification could not be turned into a ScanCarry.
Every variant names a disagreement between the attestation and the set it claims to describe, not a property of the files on disk. They are caller bugs — a mismatched set, an attestation that contradicts itself — and are reported rather than absorbed, because a carry built from an attestation this crate could not make sense of is exactly the thing that must never reach a repair.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownFile
The verification covers a file the set does not describe.
DuplicateFile
Two entries in the verification claim the same file.
UncoveredFile
A recoverable file in the set has no entry in the verification. A carry must describe the whole set: what it does not mention would otherwise be silently taken as unrecoverable.
SliceCountMismatch
The per-slice validity vector is not the length the set’s slice layout requires for that file.
DamagedCountMismatch
missing_slice_count disagrees with the count of invalid slices, or a
Damaged(n) status disagrees with either.
IncompleteCompleteFile
A file claimed Complete whose validity vector is not all-valid.
MissingFileWithContent
A file claimed Missing for which a stat fingerprint was supplied, or
whose validity vector claims a valid slice. A missing file has neither.
UnfingerprintedFile
A file that is not Missing but carries no stat fingerprint. Without
one there is nothing for the carry gate to re-check, so the carry would
be refused at repair time anyway; refusing to build it says so up front.
RelocatedFile
A Renamed status. A carry built from a host verification describes
files at their canonical paths only (see ScanCarry::from_verification).
Set(Par2Error)
The set could not be laid out into source files and blocks at all.
Trait Implementations§
Source§impl Debug for ExternalCarryError
impl Debug for ExternalCarryError
Source§impl Display for ExternalCarryError
impl Display for ExternalCarryError
Source§impl Error for ExternalCarryError
impl Error for ExternalCarryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ExternalCarryError
impl !UnwindSafe for ExternalCarryError
impl Freeze for ExternalCarryError
impl Send for ExternalCarryError
impl Sync for ExternalCarryError
impl Unpin for ExternalCarryError
impl UnsafeUnpin for ExternalCarryError
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