pub struct ZerocopyFileWriter { /* private fields */ }Expand description
Zero-copy optimized file writer
Implementations§
Source§impl ZerocopyFileWriter
impl ZerocopyFileWriter
Sourcepub async fn new(
file_path: PathBuf,
config: StorageConfig,
compression_mode: CompressionMode,
) -> Result<Self>
pub async fn new( file_path: PathBuf, config: StorageConfig, compression_mode: CompressionMode, ) -> Result<Self>
Create a new zero-copy optimized file writer
Sourcepub async fn write_trade_zerocopy(&self, trade: &TradeRecord) -> Result<()>
pub async fn write_trade_zerocopy(&self, trade: &TradeRecord) -> Result<()>
Write a trade record using zero-copy patterns
Sourcepub async fn write_orderbook_zerocopy(
&self,
orderbook: &OrderBookRecord,
) -> Result<()>
pub async fn write_orderbook_zerocopy( &self, orderbook: &OrderBookRecord, ) -> Result<()>
Write an orderbook record using zero-copy patterns
Sourcepub async fn write_trade_batch_simd(
&self,
trades: &[&TradeRecord],
) -> Result<u64>
pub async fn write_trade_batch_simd( &self, trades: &[&TradeRecord], ) -> Result<u64>
Write multiple trades using SIMD-optimized batching
Sourcepub fn get_stats(&self) -> ZerocopyWriterStats
pub fn get_stats(&self) -> ZerocopyWriterStats
Get zero-copy writer statistics
Sourcepub const fn compression_mode(&self) -> CompressionMode
pub const fn compression_mode(&self) -> CompressionMode
Get compression mode
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZerocopyFileWriter
impl !RefUnwindSafe for ZerocopyFileWriter
impl Send for ZerocopyFileWriter
impl Sync for ZerocopyFileWriter
impl Unpin for ZerocopyFileWriter
impl !UnwindSafe for ZerocopyFileWriter
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