pub enum ReadingError {
FailedToReadChunk {
chunk_location: u64,
error: Error,
},
PosProofsMismatch {
piece_offset: PieceOffset,
},
FailedToErasureDecodeRecord {
piece_offset: PieceOffset,
error: ErasureCodingError,
},
WrongRecordSizeAfterDecoding {
expected: usize,
actual: usize,
},
FailedToDecodeSectorContentsMap(SectorContentsMapFromBytesError),
Io(Error),
ChecksumMismatch,
}Expand description
Errors that happen during reading
Variants§
FailedToReadChunk
Failed to read chunk.
This is an implementation bug, most likely due to mismatch between sector contents map and other farming parameters.
PosProofsMismatch
PoS proofs don’t match the sector contents map.
Either the sector contents map has no entry for the record, or the record’s chunks in it are not at exactly the s-buckets that have proofs. There is no entry when the piece offset is outside of the sector. Chunks at other s-buckets usually mean that the sector doesn’t match its metadata, so proofs are created for a different sector ID than the one the sector was plotted with.
Fields
piece_offset: PieceOffsetPiece offset
FailedToErasureDecodeRecord
Failed to erasure-decode record
WrongRecordSizeAfterDecoding
Wrong record size after decoding
FailedToDecodeSectorContentsMap(SectorContentsMapFromBytesError)
Failed to decode sector contents map
Io(Error)
I/O error occurred
ChecksumMismatch
Checksum mismatch
Implementations§
Trait Implementations§
Source§impl Debug for ReadingError
impl Debug for ReadingError
Source§impl Display for ReadingError
impl Display for ReadingError
Source§impl Error for ReadingError
impl Error for ReadingError
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()
Source§impl From<Error> for ReadingError
impl From<Error> for ReadingError
Source§impl From<ReadingError> for ProvingError
impl From<ReadingError> for ProvingError
Source§fn from(source: ReadingError) -> Self
fn from(source: ReadingError) -> Self
Source§impl From<SectorContentsMapFromBytesError> for ReadingError
impl From<SectorContentsMapFromBytesError> for ReadingError
Source§fn from(source: SectorContentsMapFromBytesError) -> Self
fn from(source: SectorContentsMapFromBytesError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ReadingError
impl !UnwindSafe for ReadingError
impl Forget for ReadingError
impl Freeze for ReadingError
impl Send for ReadingError
impl Sync for ReadingError
impl Unpin for ReadingError
impl UnsafeUnpin for ReadingError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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