Skip to main content

ArrowIpcStreamRequest

Trait ArrowIpcStreamRequest 

Source
pub trait ArrowIpcStreamRequest {
    // Required methods
    fn arrow_ipc_stream_body<S>(
        self,
        schema: SchemaRef,
        stream: S,
    ) -> RequestBuilder
       where S: Stream<Item = RecordBatch> + Send + 'static;
    fn try_arrow_ipc_stream_body<S, E>(
        self,
        schema: SchemaRef,
        stream: S,
    ) -> RequestBuilder
       where S: Stream<Item = Result<RecordBatch, E>> + Send + 'static,
             E: Into<Box<dyn Error + Send + Sync>> + Send + 'static;
}
Available on crate feature arrow only.
Expand description

Extension trait for reqwest::RequestBuilder that streams an Arrow IPC request body.

Unlike decoding, encoding needs the schema up front: it is written once, ahead of the first batch. See ReqwestStreamBody for the HTTP caveats.

Required Methods§

Source

fn arrow_ipc_stream_body<S>( self, schema: SchemaRef, stream: S, ) -> RequestBuilder
where S: Stream<Item = RecordBatch> + Send + 'static,

Streams stream as an Arrow IPC stream, setting Content-Type: application/vnd.apache.arrow.stream.

Source

fn try_arrow_ipc_stream_body<S, E>( self, schema: SchemaRef, stream: S, ) -> RequestBuilder
where S: Stream<Item = Result<RecordBatch, E>> + Send + 'static, E: Into<Box<dyn Error + Send + Sync>> + Send + 'static,

Streams a fallible stream as an Arrow IPC stream.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ArrowIpcStreamRequest for RequestBuilder

Source§

fn arrow_ipc_stream_body<S>( self, schema: SchemaRef, stream: S, ) -> RequestBuilder
where S: Stream<Item = RecordBatch> + Send + 'static,

Source§

fn try_arrow_ipc_stream_body<S, E>( self, schema: SchemaRef, stream: S, ) -> RequestBuilder
where S: Stream<Item = Result<RecordBatch, E>> + Send + 'static, E: Into<Box<dyn Error + Send + Sync>> + Send + 'static,

Implementors§