pub enum ViewAccessError {
OutOfBounds {
index: usize,
len: usize,
field_name: Option<&'static str>,
},
UnexpectedNull {
index: usize,
field_name: Option<&'static str>,
},
TypeMismatch {
expected: DataType,
actual: DataType,
field_name: Option<&'static str>,
},
Custom(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Error type for view access failures when reading from Arrow arrays.
Variants§
OutOfBounds
Index out of bounds
Fields
UnexpectedNull
Unexpected null value
Fields
TypeMismatch
Type mismatch during array downcast
Fields
Custom(Box<dyn Error + Send + Sync + 'static>)
Custom user-defined error from domain-specific validation
This variant allows custom types (newtypes) to wrap their own error types
while still using the common ViewAccessError type. The error can be
downcast to the specific type when needed.
Trait Implementations§
Source§impl Debug for ViewAccessError
impl Debug for ViewAccessError
Source§impl Display for ViewAccessError
impl Display for ViewAccessError
Source§impl Error for ViewAccessError
impl Error for ViewAccessError
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
Source§impl From<Infallible> for ViewAccessError
Available on crate feature views only.Allows generic code to uniformly handle both infallible and fallible view-to-owned conversions.
impl From<Infallible> for ViewAccessError
views only.Allows generic code to uniformly handle both infallible and fallible view-to-owned conversions.
When converting views to owned types, primitives and String never fail (TryFrom<Primitive, Error = Infallible>), while nested structs can fail (TryFrom<StructView, Error = ViewAccessError>). This blanket conversion allows generic code like List<T> or Map<K, V> to
use a single implementation with E: Into<ViewAccessError> bounds that works for both cases.
The empty match is safe because Infallible is an uninhabited type that can never be
constructed.
Source§fn from(x: Infallible) -> Self
fn from(x: Infallible) -> Self
Source§impl From<ViewAccessError> for SchemaError
Available on crate feature views only.
impl From<ViewAccessError> for SchemaError
views only.