pub trait FromArrow: Sized {
// Required method
fn from_arrow_bin_array<B: List<Item = [u8]> + 'static, U: List<Item = str> + 'static>(
batch: &ArrowBatch,
) -> Vec<Self>;
// Provided methods
fn from_arrow(batch: &ArrowBatch) -> Vec<Self> { ... }
fn from_arrow_bin_view_array(batch: &ArrowBatch) -> Vec<Self> { ... }
}
Expand description
Used to do ArrowBatch-Native Rust type conversions while consuming the input value.
Required Methods§
Sourcefn from_arrow_bin_array<B: List<Item = [u8]> + 'static, U: List<Item = str> + 'static>(
batch: &ArrowBatch,
) -> Vec<Self>
fn from_arrow_bin_array<B: List<Item = [u8]> + 'static, U: List<Item = str> + 'static>( batch: &ArrowBatch, ) -> Vec<Self>
Converts to the Vector type from the ArrowBatch type. B is the type of binary array used to downcast since we use both binary views and binary arrays
Provided Methods§
Sourcefn from_arrow(batch: &ArrowBatch) -> Vec<Self>
fn from_arrow(batch: &ArrowBatch) -> Vec<Self>
Default implementation that uses the binary array type. IPC is written with regular binary arrays. Named ‘from_arrow’ for backwards compatibility.
Sourcefn from_arrow_bin_view_array(batch: &ArrowBatch) -> Vec<Self>
fn from_arrow_bin_view_array(batch: &ArrowBatch) -> Vec<Self>
An additional method that uses the binary view array type. This is to be able to reuse the trait server side where Binary Views are used instead.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.