nautilus_serialization::arrow

Trait EncodeToRecordBatch

Source
pub trait EncodeToRecordBatch
where Self: Sized + ArrowSchemaProvider,
{ // Required methods fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>; fn metadata(&self) -> HashMap<String, String>; // Provided method fn chunk_metadata(chunk: &[Self]) -> HashMap<String, String> { ... } }

Required Methods§

Source

fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>

Source

fn metadata(&self) -> HashMap<String, String>

Provided Methods§

Source

fn chunk_metadata(chunk: &[Self]) -> HashMap<String, String>

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 EncodeToRecordBatch for Bar

Source§

fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>

Source§

fn metadata(&self) -> HashMap<String, String>

Source§

impl EncodeToRecordBatch for OrderBookDelta

Source§

fn chunk_metadata(chunk: &[Self]) -> HashMap<String, String>

Extract metadata from first two deltas

Use the second delta if the first one has 0 precision

Source§

fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>

Source§

fn metadata(&self) -> HashMap<String, String>

Source§

impl EncodeToRecordBatch for OrderBookDepth10

Source§

fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>

Source§

fn metadata(&self) -> HashMap<String, String>

Source§

impl EncodeToRecordBatch for QuoteTick

Source§

fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>

Source§

fn metadata(&self) -> HashMap<String, String>

Source§

impl EncodeToRecordBatch for TradeTick

Source§

fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>

Source§

fn metadata(&self) -> HashMap<String, String>

Implementors§