pub struct HighSpeedBufferedWriter { /* private fields */ }
Expand description
High-speed buffered writer
Implementations§
Source§impl HighSpeedBufferedWriter
impl HighSpeedBufferedWriter
Sourcepub fn new<P: AsRef<Path>>(
path: P,
config: HighSpeedWriterConfig,
) -> TrackingResult<Self>
pub fn new<P: AsRef<Path>>( path: P, config: HighSpeedWriterConfig, ) -> TrackingResult<Self>
Create a new high-speed buffered writer
Sourcepub fn write_processed_shards(
&mut self,
shards: &[ProcessedShard],
) -> TrackingResult<WritePerformanceStats>
pub fn write_processed_shards( &mut self, shards: &[ProcessedShard], ) -> TrackingResult<WritePerformanceStats>
Write processed shards
Sourcepub fn write_custom_json(
&mut self,
json_data: &[u8],
) -> TrackingResult<WritePerformanceStats>
pub fn write_custom_json( &mut self, json_data: &[u8], ) -> TrackingResult<WritePerformanceStats>
Write custom JSON data
Sourcepub fn flush(&mut self) -> TrackingResult<()>
pub fn flush(&mut self) -> TrackingResult<()>
Force buffer flush
Sourcepub fn finalize(self) -> TrackingResult<WritePerformanceStats>
pub fn finalize(self) -> TrackingResult<WritePerformanceStats>
Finalize writing and get final statistics
Sourcepub fn get_stats(&self) -> &WritePerformanceStats
pub fn get_stats(&self) -> &WritePerformanceStats
Get current statistics
Sourcepub fn get_config(&self) -> &HighSpeedWriterConfig
pub fn get_config(&self) -> &HighSpeedWriterConfig
Get configuration
Auto Trait Implementations§
impl Freeze for HighSpeedBufferedWriter
impl RefUnwindSafe for HighSpeedBufferedWriter
impl Send for HighSpeedBufferedWriter
impl Sync for HighSpeedBufferedWriter
impl Unpin for HighSpeedBufferedWriter
impl UnwindSafe for HighSpeedBufferedWriter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more