pub enum Error {
Show 13 variants
NotSourcePiece {
mapping: GlobalObject,
},
PieceOffsetTooLarge {
mapping: GlobalObject,
},
NoSegmentItem {
progress: usize,
offset_in_segment: usize,
segment_index: SegmentIndex,
mapping: GlobalObject,
},
UnexpectedFirstSegmentItem {
segment_progress: usize,
offset_in_segment: usize,
segment_index: SegmentIndex,
segment_item: Box<SegmentItem>,
mapping: GlobalObject,
},
UnexpectedContinuingSegmentItem {
collected_data: usize,
segment_index: SegmentIndex,
segment_item: Box<SegmentItem>,
mapping: GlobalObject,
},
TooManySegments {
first_segment_index: SegmentIndex,
last_segment_index: SegmentIndex,
mapping: GlobalObject,
},
ObjectTooLarge {
data_length: usize,
max_object_len: usize,
mapping: GlobalObject,
},
LengthPrefixTooLarge {
length_prefix_len: usize,
max_object_len: usize,
mapping: GlobalObject,
},
InvalidDataHash {
data_hash: Blake3Hash,
data_size: usize,
mapping: GlobalObject,
},
ObjectDecoding {
source: Error,
mapping: GlobalObject,
},
SegmentGetter {
source: SegmentDownloadingError,
mapping: GlobalObject,
},
PieceGetterError {
source: Error,
mapping: GlobalObject,
},
PieceNotFound {
piece_index: PieceIndex,
},
}
Expand description
Object fetching errors.
Variants§
NotSourcePiece
Supplied piece index is not a source piece
Fields
§
mapping: GlobalObject
PieceOffsetTooLarge
Supplied piece offset is too large
Fields
§
mapping: GlobalObject
NoSegmentItem
No item in segment at offset
UnexpectedFirstSegmentItem
Unexpected item in first segment at offset
UnexpectedContinuingSegmentItem
Unexpected item in continuing segment at offset
TooManySegments
Object not found after downloading expected number of segments
ObjectTooLarge
Object is too large error
LengthPrefixTooLarge
Length prefix is too large error
InvalidDataHash
Hash doesn’t match data
ObjectDecoding
Object decoding error
SegmentGetter
Segment getter error
PieceGetterError
Piece getter error
PieceNotFound
Piece getter couldn’t find the piece
Fields
§
piece_index: PieceIndex
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
§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>
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