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§
Sourcefn path_prefix() -> &'static str
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.