Skip to main content

Module arrow

Module arrow 

Source
Expand description

Defines the Apache Arrow schema for Nautilus types.

Re-exports§

pub use self::legacy::is_legacy_enum_field;
pub use self::legacy::is_nautilus_legacy_schema;
pub use self::legacy::is_nautilus_timestamp_schema;
pub use self::legacy::is_timestamp_field;
pub use self::legacy::normalize_legacy_fixed_columns;
pub use self::legacy::normalized_legacy_data_type;
pub use self::legacy::normalized_timestamp_type;

Modules§

account_state
bar
catalog_display
Converts raw catalog Arrow batches into display-friendly Arrow batches.
close
custom
Custom data: registration and dynamic decoding.
delta
depth
display
Display-mode Arrow encoders for Nautilus types.
funding
index_price
instrument
Arrow serialization for instruments.
instrument_status
json
legacy
Legacy Arrow schema detection and conversion to current Rust schemas.
mark_price
option_greeks
order_event
position_event
quote
report
snapshot
trade

Enums§

BinaryColumnRef
Reference to a binary column, either Binary or BinaryView.
DataStreamingError
EncodingError
StringColumnRef
Reference to a string column in a supported Arrow string representation.
U32ColumnRef
Reference to an unsigned 32-bit column stored as UInt32, Int32, or Int64.
U64ColumnRef
Reference to an unsigned 64-bit value stored as an integer or UTC nanosecond timestamp.

Constants§

FIXED_DECIMAL_PRECISION
FIXED_DECIMAL_SCALE
KEY_BAR_TYPE
KEY_IDENTIFIER
KEY_INSTRUMENT_ID
KEY_PRICE_PRECISION
KEY_SIZE_PRECISION
KEY_TYPE_NAME

Traits§

ArrowSchemaProvider
Provides Apache Arrow schema definitions for data types.
DecodeDataFromRecordBatch
Decodes raw Data objects from Apache Arrow RecordBatch format.
DecodeFromRecordBatch
Decodes data types from Apache Arrow RecordBatch format.
DecodeTypedFromRecordBatch
Decodes strongly typed values from Apache Arrow RecordBatch format.
EncodeToRecordBatch
Encodes data types to Apache Arrow RecordBatch format.
WriteStream
Writes RecordBatch data to output streams.

Functions§

bars_to_arrow_record_batch_bytes
Converts a vector of Bar into an Arrow RecordBatch.
book_deltas_to_arrow_record_batch_bytes
Converts a vector of OrderBookDelta into an Arrow RecordBatch.
book_depths_to_arrow_record_batch_bytes
Converts a vector of OrderBookDepth into an Arrow RecordBatch.
catalog_identifier_from_metadata
Returns the catalog row identifier from Arrow schema metadata.
decimal_to_arrow
Encodes a Rust decimal at the catalog’s scale.
decode_decimal
Decodes a Rust decimal from the catalog’s scale.
decode_decimal_price
Decodes a price from a nullable scale-16 decimal column.
decode_decimal_quantity
Decodes a quantity from a nullable scale-16 decimal column.
decode_money
Decodes a monetary value from its Arrow struct representation.
decode_price
Decodes a [Price] from raw bytes with bounds validation.
decode_price_with_sentinel
Decodes a [Price] from raw bytes, using precision 0 for sentinel values.
decode_quantity
Decodes a [Quantity] from raw bytes with bounds validation.
decode_quantity_with_sentinel
Decodes a [Quantity] from raw bytes, using precision 0 for sentinel values.
decode_required_decimal_price
Decodes a required price from a scale-16 decimal column.
decode_required_decimal_quantity
Decodes a required quantity from a scale-16 decimal column.
decode_required_timestamp
Returns a required timestamp value, naming the field and row on NULL.
decode_timestamp
Reads a non-negative Arrow nanosecond timestamp as the model’s unsigned representation.
enum_dictionary_array
Builds a compact dictionary array containing enum display names.
enum_dictionary_data_type
Returns the open Arrow data type used for enum-valued catalog columns.
extract_column
Extracts and downcasts the specified column_key column from an Arrow array slice.
extract_column_binary
Extracts a binary column, accepting both Binary (BinaryArray) and BinaryView (BinaryViewArray). DataFusion may return BinaryView when reading Parquet, so this handles both formats.
extract_column_by_name_or_index
Extracts a column by name when present, falling back to an index for older schemas.
extract_column_string
Extracts a string column, accepting both Utf8 (StringArray) and Utf8View (StringViewArray). Parquet may return Utf8View when reading, so this handles both formats.
extract_decimal_column
Extracts a decimal column by its schema name.
extract_optional_string_column_by_name
Extracts an optional UTF-8 column by name.
fixed_decimal_data_type
Returns the open fixed-point Arrow data type used by catalog write schemas.
identifier_array_from_display
Builds a string array for catalog identifiers without collecting intermediate strings.
index_prices_to_arrow_record_batch_bytes
Converts a vector of IndexPriceUpdate into an Arrow RecordBatch.
instrument_closes_to_arrow_record_batch_bytes
Converts a vector of InstrumentClose into an Arrow RecordBatch.
instrument_status_to_arrow_record_batch_bytes
Converts a vector of InstrumentStatus into an Arrow RecordBatch.
is_json_string_field
Returns whether a field carries the canonical Arrow JSON extension.
json_string_field
Returns a UTF-8 field annotated with the canonical Arrow JSON extension.
mark_prices_to_arrow_record_batch_bytes
Converts a vector of MarkPriceUpdate into an Arrow RecordBatch.
money_array
Builds a nullable struct array containing monetary amounts and currencies.
money_data_type
Returns the open Arrow data type used for monetary values.
option_greeks_to_arrow_record_batch_bytes
Converts a vector of OptionGreeks into an Arrow RecordBatch.
optional_timestamp_array
Builds a nullable UTC nanosecond timestamp array from model timestamp values.
optional_ustr_value
Returns an optional [Ustr] value from an optional string column.
price_decimal_array
Builds a scale-16 decimal array from model price raw values.
price_raw_to_decimal
Encodes a model price raw value at the catalog’s uniform decimal scale.
quantity_decimal_array
Builds a scale-16 decimal array from model quantity raw values.
quantity_raw_to_decimal
Encodes a model quantity raw value at the catalog’s uniform decimal scale.
quotes_to_arrow_record_batch_bytes
Converts a vector of QuoteTick into an Arrow RecordBatch.
record_batch_with_identifier_column
Adds the catalog identifier column used by table-oriented catalog storage.
record_batch_with_identifier_values
Adds the catalog identifier column with one identifier value per row.
record_batch_with_timestamps
Builds a record batch, converting unsigned nanosecond inputs for timestamp schema fields.
record_batch_with_u64_timestamps
Converts logical timestamp columns to unsigned nanoseconds for existing model decoders.
record_batch_without_identifier_column
Drops the catalog identifier column when writing legacy per-identifier formats.
required_price_decimal_array
Builds a scale-16 decimal array from price raw values of a type with no NULL sentinel.
required_quantity_decimal_array
Builds a scale-16 decimal array from quantity raw values of a type with no NULL sentinel.
schema_with_identifier_column
Builds a schema with the catalog identifier column appended if absent.
schema_without_identifier_column
Builds a schema without the catalog identifier column.
timestamp_array
Builds a UTC nanosecond timestamp array from model timestamp values.
timestamp_data_type
Returns the open Arrow data type used for nanosecond instants.
trades_to_arrow_record_batch_bytes
Converts a vector of TradeTick into an Arrow RecordBatch.
validate_precision_bytes
Validates that a [FixedSizeBinaryArray] has the expected precision byte width.