#[non_exhaustive]pub enum RecordErrorKind {
Primitive(PrimitiveError),
Crc(CrcMismatch),
Compression(CompressionError),
UnsupportedMagic(i8),
BatchTooSmall {
got: i32,
min: i32,
},
RecordCountTooLarge {
got: i32,
max: usize,
},
NegativeLength {
field: &'static str,
length: i32,
},
LengthOverflow {
field: &'static str,
got: usize,
remaining: usize,
},
}Expand description
Specific reason a record-batch operation failed.
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.
Primitive(PrimitiveError)
Underlying primitive read failed.
Crc(CrcMismatch)
CRC32C verification failed.
Compression(CompressionError)
Compression codec dispatch / decode failed.
UnsupportedMagic(i8)
Magic byte is not 2 (v2 record batches only).
BatchTooSmall
batchLength is below the minimum (BATCH_HEADER_SIZE = 49).
RecordCountTooLarge
recordCount exceeds crate::record::MAX_RECORDS_PER_BATCH.
NegativeLength
A varint length field was negative where it must be >= 0.
Fields
LengthOverflow
A length field exceeds the remaining buffer.
Trait Implementations§
Source§impl Debug for RecordErrorKind
impl Debug for RecordErrorKind
Source§impl Display for RecordErrorKind
impl Display for RecordErrorKind
Source§impl Error for RecordErrorKind
impl Error for RecordErrorKind
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 From<CompressionError> for RecordErrorKind
impl From<CompressionError> for RecordErrorKind
Source§fn from(source: CompressionError) -> Self
fn from(source: CompressionError) -> Self
Converts to this type from the input type.
Source§impl From<CrcMismatch> for RecordErrorKind
impl From<CrcMismatch> for RecordErrorKind
Source§fn from(source: CrcMismatch) -> Self
fn from(source: CrcMismatch) -> Self
Converts to this type from the input type.
Source§impl From<PrimitiveError> for RecordErrorKind
impl From<PrimitiveError> for RecordErrorKind
Source§fn from(source: PrimitiveError) -> Self
fn from(source: PrimitiveError) -> Self
Converts to this type from the input type.
Source§impl From<RecordErrorKind> for RecordError
impl From<RecordErrorKind> for RecordError
Source§fn from(kind: RecordErrorKind) -> Self
fn from(kind: RecordErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RecordErrorKind
impl RefUnwindSafe for RecordErrorKind
impl Send for RecordErrorKind
impl Sync for RecordErrorKind
impl Unpin for RecordErrorKind
impl UnsafeUnpin for RecordErrorKind
impl UnwindSafe for RecordErrorKind
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