Trait CatalogPathPrefix

Source
pub trait CatalogPathPrefix {
    // Required method
    fn path_prefix() -> &'static str;
}
Expand description

Trait for providing catalog path prefixes for different data types.

This trait enables type-safe organization of data within the catalog by providing a standardized way to determine the directory structure for each data type. Each data type maps to a specific subdirectory within the catalog’s data folder.

§Implementation

Types implementing this trait should return a static string that represents the directory name where data of that type should be stored.

§Examples

use nautilus_persistence::backend::catalog::CatalogPathPrefix;
use nautilus_model::data::QuoteTick;

assert_eq!(QuoteTick::path_prefix(), "quotes");

Required Methods§

Source

fn path_prefix() -> &'static str

Returns the path prefix (directory name) for this data type.

§Returns

A static string representing the directory name where this data type is stored.

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

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for IndexPriceUpdate

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for InstrumentClose

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for MarkPriceUpdate

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for OrderBookDelta

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for OrderBookDepth10

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for QuoteTick

Source§

fn path_prefix() -> &'static str

Source§

impl CatalogPathPrefix for TradeTick

Source§

fn path_prefix() -> &'static str

Implementors§