pub trait StreamFormatEncode<T>: StreamFormat {
type Encoder: ItemEncoder<T>;
// Required method
fn encoder(&self) -> Self::Encoder;
}Expand description
Encodes items of type T into bytes.
Required Associated Types§
Sourcetype Encoder: ItemEncoder<T>
type Encoder: ItemEncoder<T>
The per-stream encoder. A fresh one is built for every body, because framing state (item index, Arrow’s dictionary tracker, CSV’s header flag) is per-stream.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl StreamFormatEncode<RecordBatch> for ArrowRecordBatchIpcStreamFormat
Available on crate feature arrow only.
impl StreamFormatEncode<RecordBatch> for ArrowRecordBatchIpcStreamFormat
Available on crate feature
arrow only.type Encoder = ArrowIpcEncoder
Source§impl StreamFormatEncode<String> for TextStreamFormat
Available on crate feature text only.
impl StreamFormatEncode<String> for TextStreamFormat
Available on crate feature
text only.type Encoder = TextEncoder
Source§impl<T, E> StreamFormatEncode<T> for JsonArrayStreamFormat<E>
Available on crate feature json only.
impl<T, E> StreamFormatEncode<T> for JsonArrayStreamFormat<E>
Available on crate feature
json only.type Encoder = JsonArrayEncoder
Source§impl<T> StreamFormatEncode<T> for CsvStreamFormatwhere
T: Serialize,
Available on crate feature csv only.
impl<T> StreamFormatEncode<T> for CsvStreamFormatwhere
T: Serialize,
Available on crate feature
csv only.type Encoder = CsvEncoder
Source§impl<T> StreamFormatEncode<T> for JsonNewLineStreamFormatwhere
T: Serialize,
Available on crate feature json only.
impl<T> StreamFormatEncode<T> for JsonNewLineStreamFormatwhere
T: Serialize,
Available on crate feature
json only.type Encoder = JsonNewLineEncoder
Source§impl<T> StreamFormatEncode<T> for ProtobufStreamFormatwhere
T: Message,
Available on crate feature protobuf only.
impl<T> StreamFormatEncode<T> for ProtobufStreamFormatwhere
T: Message,
Available on crate feature
protobuf only.