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>,
},
}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
Trait Implementations§
Source§impl Clone for ViewAccessError
impl Clone for ViewAccessError
Source§fn clone(&self) -> ViewAccessError
fn clone(&self) -> ViewAccessError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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)>
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<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
Available on crate feature
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
Converts to this type from the input type.
Source§impl From<ViewAccessError> for SchemaError
Available on crate feature views only.
impl From<ViewAccessError> for SchemaError
Available on crate feature
views only.Source§fn from(err: ViewAccessError) -> Self
fn from(err: ViewAccessError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ViewAccessError
impl RefUnwindSafe for ViewAccessError
impl Send for ViewAccessError
impl Sync for ViewAccessError
impl Unpin for ViewAccessError
impl UnwindSafe for ViewAccessError
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