#[non_exhaustive]pub enum CsvErrorKind {
BareCarriageReturn,
QuoteInUnquotedField,
UnterminatedQuotedField,
TextAfterQuotedField,
FieldCountMismatch {
expected: usize,
found: usize,
},
LimitExceeded(CsvLimitKind),
}Expand description
The category of a CSV reading failure.
This is a stable, machine-readable classification: match on it for
programmatic handling rather than on Display text.
#[non_exhaustive]: new kinds may be added in a future release, so match
with a wildcard arm.
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.
BareCarriageReturn
A carriage return (\r) that was not immediately followed by a line
feed (\n). Only \n and \r\n terminate a record.
QuoteInUnquotedField
A double quote (") appeared inside an unquoted field.
UnterminatedQuotedField
A quoted field began with " but the closing quote was never found.
TextAfterQuotedField
Characters other than a delimiter or record terminator followed the closing quote of a quoted field.
FieldCountMismatch
A record had a different number of fields than the first record. CSV read by this crate is rectangular.
Fields
LimitExceeded(CsvLimitKind)
A configured CsvLimits value was exceeded.
Trait Implementations§
Source§impl Clone for CsvErrorKind
impl Clone for CsvErrorKind
Source§fn clone(&self) -> CsvErrorKind
fn clone(&self) -> CsvErrorKind
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 moreimpl Copy for CsvErrorKind
Source§impl Debug for CsvErrorKind
impl Debug for CsvErrorKind
impl Eq for CsvErrorKind
Source§impl PartialEq for CsvErrorKind
impl PartialEq for CsvErrorKind
Source§fn eq(&self, other: &CsvErrorKind) -> bool
fn eq(&self, other: &CsvErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CsvErrorKind
Auto Trait Implementations§
impl Freeze for CsvErrorKind
impl RefUnwindSafe for CsvErrorKind
impl Send for CsvErrorKind
impl Sync for CsvErrorKind
impl Unpin for CsvErrorKind
impl UnsafeUnpin for CsvErrorKind
impl UnwindSafe for CsvErrorKind
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