#[non_exhaustive]pub struct RecordError {
pub base_offset: i64,
pub kind: RecordErrorKind,
}Expand description
Error from record-batch / record / header read or write.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.base_offset: i64base_offset of the batch being processed, or -1 if unknown.
kind: RecordErrorKindWhat specifically went wrong.
Implementations§
Source§impl RecordError
impl RecordError
Sourcepub const fn at_offset(base_offset: i64, kind: RecordErrorKind) -> Self
pub const fn at_offset(base_offset: i64, kind: RecordErrorKind) -> Self
Construct a RecordError with a known base_offset.
Sourcepub const fn unknown_offset(kind: RecordErrorKind) -> Self
pub const fn unknown_offset(kind: RecordErrorKind) -> Self
Construct a RecordError when the offset is not yet known.
Trait Implementations§
Source§impl Debug for RecordError
impl Debug for RecordError
Source§impl Display for RecordError
impl Display for RecordError
Source§impl Error for RecordError
impl Error for RecordError
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 RecordError
impl From<CompressionError> for RecordError
Source§fn from(err: CompressionError) -> Self
fn from(err: CompressionError) -> Self
Converts to this type from the input type.
Source§impl From<CrcMismatch> for RecordError
impl From<CrcMismatch> for RecordError
Source§fn from(err: CrcMismatch) -> Self
fn from(err: CrcMismatch) -> Self
Converts to this type from the input type.
Source§impl From<PrimitiveError> for RecordError
impl From<PrimitiveError> for RecordError
Source§fn from(err: PrimitiveError) -> Self
fn from(err: PrimitiveError) -> Self
Converts to this type from the input type.
Source§impl From<RecordError> for ProtocolError
impl From<RecordError> for ProtocolError
Source§fn from(source: RecordError) -> Self
fn from(source: RecordError) -> 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 RecordError
impl RefUnwindSafe for RecordError
impl Send for RecordError
impl Sync for RecordError
impl Unpin for RecordError
impl UnsafeUnpin for RecordError
impl UnwindSafe for RecordError
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