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§
- Binary
Column Ref - Reference to a binary column, either Binary or BinaryView.
- Data
Streaming Error - Encoding
Error - String
Column Ref - Reference to a string column in a supported Arrow string representation.
- U32Column
Ref - Reference to an unsigned 32-bit column stored as
UInt32,Int32, orInt64. - U64Column
Ref - 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§
- Arrow
Schema Provider - Provides Apache Arrow schema definitions for data types.
- Decode
Data From Record Batch - Decodes raw Data objects from Apache Arrow RecordBatch format.
- Decode
From Record Batch - Decodes data types from Apache Arrow RecordBatch format.
- Decode
Typed From Record Batch - Decodes strongly typed values from Apache Arrow RecordBatch format.
- Encode
ToRecord Batch - Encodes data types to Apache Arrow RecordBatch format.
- Write
Stream - Writes RecordBatch data to output streams.
Functions§
- bars_
to_ arrow_ record_ batch_ bytes - Converts a vector of
Barinto an ArrowRecordBatch. - book_
deltas_ to_ arrow_ record_ batch_ bytes - Converts a vector of
OrderBookDeltainto an ArrowRecordBatch. - book_
depths_ to_ arrow_ record_ batch_ bytes - Converts a vector of
OrderBookDepthinto an ArrowRecordBatch. - 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_keycolumn 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
IndexPriceUpdateinto an ArrowRecordBatch. - instrument_
closes_ to_ arrow_ record_ batch_ bytes - Converts a vector of
InstrumentCloseinto an ArrowRecordBatch. - instrument_
status_ to_ arrow_ record_ batch_ bytes - Converts a vector of
InstrumentStatusinto an ArrowRecordBatch. - 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
MarkPriceUpdateinto an ArrowRecordBatch. - 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
OptionGreeksinto an ArrowRecordBatch. - 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
QuoteTickinto an ArrowRecordBatch. - record_
batch_ with_ identifier_ column - Adds the catalog
identifiercolumn used by table-oriented catalog storage. - record_
batch_ with_ identifier_ values - Adds the catalog
identifiercolumn 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
identifiercolumn 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
identifiercolumn appended if absent. - schema_
without_ identifier_ column - Builds a schema without the catalog
identifiercolumn. - 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
TradeTickinto an ArrowRecordBatch. - validate_
precision_ bytes - Validates that a [
FixedSizeBinaryArray] has the expected precision byte width.