#[non_exhaustive]pub enum ChunkDecodeError {
UnexpectedEof {
what: &'static str,
},
FieldTooLong {
field: &'static str,
len: usize,
max: usize,
},
InvalidUtf8 {
field: &'static str,
source: FromUtf8Error,
},
}Expand description
Why FileChunk::from_bytes rejected a binary payload.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedEof
The payload ended before the named value could be read.
FieldTooLong
A length prefix exceeds the wire-format cap for its field.
Fields
InvalidUtf8
A string field holds invalid UTF-8.
Fields
§
source: FromUtf8ErrorThe underlying UTF-8 decode failure.
Trait Implementations§
Source§impl Clone for ChunkDecodeError
impl Clone for ChunkDecodeError
Source§fn clone(&self) -> ChunkDecodeError
fn clone(&self) -> ChunkDecodeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkDecodeError
impl Debug for ChunkDecodeError
Source§impl Display for ChunkDecodeError
impl Display for ChunkDecodeError
impl Eq for ChunkDecodeError
Source§impl Error for ChunkDecodeError
impl Error for ChunkDecodeError
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()
Source§impl PartialEq for ChunkDecodeError
impl PartialEq for ChunkDecodeError
impl StructuralPartialEq for ChunkDecodeError
Auto Trait Implementations§
impl Freeze for ChunkDecodeError
impl RefUnwindSafe for ChunkDecodeError
impl Send for ChunkDecodeError
impl Sync for ChunkDecodeError
impl Unpin for ChunkDecodeError
impl UnsafeUnpin for ChunkDecodeError
impl UnwindSafe for ChunkDecodeError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> 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> ⓘ
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