pub struct FileNaming {
pub exchange: String,
pub symbol: String,
pub data_type: String,
pub date: SimpleDate,
pub extension: String,
}Expand description
File naming strategy
Fields§
§exchange: StringExchange name (e.g., “binance”, “coinbase”)
symbol: StringTrading symbol (e.g., “BTCUSDT”, “ETH-USD”)
data_type: StringType of data stored (e.g., “trades”, “orderbook”)
date: SimpleDateDate of the data
extension: StringFile extension (default: “fb” for flatbuffer)
Implementations§
Source§impl FileNaming
impl FileNaming
Sourcepub fn new(
exchange: impl Into<SmartString>,
symbol: impl Into<SmartString>,
data_type: impl Into<String>,
date: SimpleDate,
) -> Self
pub fn new( exchange: impl Into<SmartString>, symbol: impl Into<SmartString>, data_type: impl Into<String>, date: SimpleDate, ) -> Self
Create a new file naming strategy
Sourcepub fn compressed_filename(&self) -> String
pub fn compressed_filename(&self) -> String
Generate the compressed filename
Sourcepub fn metadata_filename(&self) -> String
pub fn metadata_filename(&self) -> String
Generate the metadata filename
Sourcepub fn parse_filename(filename: &str) -> Option<Self>
pub fn parse_filename(filename: &str) -> Option<Self>
Parse filename to extract components
Trait Implementations§
Source§impl Clone for FileNaming
impl Clone for FileNaming
Source§fn clone(&self) -> FileNaming
fn clone(&self) -> FileNaming
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileNaming
impl RefUnwindSafe for FileNaming
impl Send for FileNaming
impl Sync for FileNaming
impl Unpin for FileNaming
impl UnwindSafe for FileNaming
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more