Trait ArrowMessage

Source
pub trait ArrowMessage {
    // Required methods
    fn field(name: impl Into<String>) -> Field;
    fn try_into_arrow(self) -> Result<Arc<dyn Array>, Report>;
    fn try_from_arrow(data: ArrayData) -> Result<Self, Report>
       where Self: Sized;
}
Expand description

Trait to represent a message that can be converted to and from an Arrow array.

Required Methods§

Source

fn field(name: impl Into<String>) -> Field

Each message must declare how it’s represented as an Arrow field.

Source

fn try_into_arrow(self) -> Result<Arc<dyn Array>, Report>

Try to convert the message into an Arrow array.

Source

fn try_from_arrow(data: ArrayData) -> Result<Self, Report>
where Self: Sized,

Try to convert an Arrow array into the message.

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.

Implementations on Foreign Types§

Source§

impl ArrowMessage for bool

Source§

impl ArrowMessage for f32

Source§

impl ArrowMessage for f64

Source§

impl ArrowMessage for i8

Source§

impl ArrowMessage for i16

Source§

impl ArrowMessage for i32

Source§

impl ArrowMessage for i64

Source§

impl ArrowMessage for u8

Source§

impl ArrowMessage for u16

Source§

impl ArrowMessage for u32

Source§

impl ArrowMessage for u64

Source§

impl ArrowMessage for String

Source§

impl ArrowMessage for GenericByteArray<GenericStringType<i32>>

Source§

impl<T> ArrowMessage for Option<T>
where T: ArrowMessage,

Source§

impl<T> ArrowMessage for PrimitiveArray<T>

Implementors§