#[non_exhaustive]pub enum NativeError {
UnsupportedColumn {
column: String,
ch_type: String,
},
TypeMismatch {
expected: &'static str,
},
RawWidth {
expected: usize,
got: usize,
},
FixedTooLong {
width: usize,
got: usize,
},
RowArity {
expected: usize,
got: usize,
},
FirstRecord(String),
TupleArity,
NotAStruct,
Internal(&'static str),
Custom(String),
}Expand description
A Native encoding failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedColumn
A column’s ClickHouse type is not supported by the Native encoder (fatal, surfaced at construction before any row is sent).
Fields
TypeMismatch
The row struct’s value did not match the column’s type class.
RawWidth
A fixed-width blob column (UUID/IPv6/Int256/UInt256) got the
wrong number of bytes.
FixedTooLong
A FixedString(N) value was longer than N.
RowArity
The row serialized a different number of fields than the schema has columns (positional mismatch).
FirstRecord(String)
The first record’s probed struct does not match the configured
columns (pre-formatted multi-line diff). Field names and order are
checked whenever the schema was fetched; under validate_schema: full this also rejects class-incompatible types per position —
including a wire-wrapper scale that disagrees with the column
(DateTime64Millis into DateTime64(6)).
TupleArity
A tuple/geo value serialized more elements than its column has.
NotAStruct
The row did not serialize as a struct/tuple of columns.
Internal(&'static str)
An internal invariant was violated (a bug).
Custom(String)
An error raised by a Serialize implementation.
Trait Implementations§
Source§impl Debug for NativeError
impl Debug for NativeError
Source§impl Display for NativeError
impl Display for NativeError
Source§impl Error for NativeError
impl Error for NativeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()