ArrowMessage

Trait ArrowMessage 

Source
pub trait ArrowMessage {
    // Required methods
    fn field(name: impl Into<String>) -> Field;
    fn try_into_arrow(self) -> Result<ArrayRef>;
    fn try_from_arrow(data: ArrayData) -> Result<Self>
       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<ArrayRef>

Try to convert the message into an Arrow array.

Source

fn try_from_arrow(data: ArrayData) -> Result<Self>
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§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for f32

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for f64

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for i8

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for i16

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for i32

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for i64

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for u8

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for u16

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for u32

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for u64

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for String

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl ArrowMessage for StringArray

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

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

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Source§

impl<T> ArrowMessage for PrimitiveArray<T>

Source§

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

Source§

fn try_into_arrow(self) -> Result<ArrayRef>

Source§

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

Implementors§