pub struct ArrowConversionError { /* private fields */ }Expand description
Root error type for hdbconnect-arrow crate.
This error type captures all possible failure modes during HANA to Arrow
conversion. Exposes predicate methods (is_xxx()) for error classification
without exposing internals.
§Example
use hdbconnect_arrow::ArrowConversionError;
fn handle_error(err: ArrowConversionError) {
if err.is_unsupported_type() {
eprintln!("Unsupported HANA type encountered");
} else if err.is_schema_mismatch() {
eprintln!("Schema mismatch detected");
}
}Implementations§
Source§impl ArrowConversionError
impl ArrowConversionError
Sourcepub const fn unsupported_type(type_id: i16) -> Self
pub const fn unsupported_type(type_id: i16) -> Self
Create error for unsupported HANA type.
Sourcepub const fn schema_mismatch(expected: usize, actual: usize) -> Self
pub const fn schema_mismatch(expected: usize, actual: usize) -> Self
Create error for schema mismatch.
Sourcepub fn value_conversion(
column: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn value_conversion( column: impl Into<String>, message: impl Into<String>, ) -> Self
Create error for value conversion failure.
Sourcepub const fn decimal_overflow(precision: u8, scale: i8) -> Self
pub const fn decimal_overflow(precision: u8, scale: i8) -> Self
Create error for decimal overflow.
Sourcepub fn lob_streaming(message: impl Into<String>) -> Self
pub fn lob_streaming(message: impl Into<String>) -> Self
Create error for LOB streaming failure.
Sourcepub fn invalid_precision(message: impl Into<String>) -> Self
pub fn invalid_precision(message: impl Into<String>) -> Self
Create error for invalid precision.
Sourcepub fn invalid_scale(message: impl Into<String>) -> Self
pub fn invalid_scale(message: impl Into<String>) -> Self
Create error for invalid scale.
Sourcepub const fn is_unsupported_type(&self) -> bool
pub const fn is_unsupported_type(&self) -> bool
Returns true if this is an unsupported type error.
Sourcepub const fn is_schema_mismatch(&self) -> bool
pub const fn is_schema_mismatch(&self) -> bool
Returns true if this is a schema mismatch error.
Sourcepub const fn is_value_conversion(&self) -> bool
pub const fn is_value_conversion(&self) -> bool
Returns true if this is a value conversion error.
Sourcepub const fn is_decimal_overflow(&self) -> bool
pub const fn is_decimal_overflow(&self) -> bool
Returns true if this is a decimal overflow error.
Sourcepub const fn is_arrow_error(&self) -> bool
pub const fn is_arrow_error(&self) -> bool
Returns true if this is an Arrow library error.
Sourcepub const fn is_hdbconnect_error(&self) -> bool
pub const fn is_hdbconnect_error(&self) -> bool
Returns true if this is an hdbconnect error.
Sourcepub const fn is_lob_streaming(&self) -> bool
pub const fn is_lob_streaming(&self) -> bool
Returns true if this is a LOB streaming error.
Sourcepub const fn is_invalid_precision(&self) -> bool
pub const fn is_invalid_precision(&self) -> bool
Returns true if this is an invalid precision error.
Sourcepub const fn is_invalid_scale(&self) -> bool
pub const fn is_invalid_scale(&self) -> bool
Returns true if this is an invalid scale error.