pub struct BufferedBinaryWriter { /* private fields */ }Expand description
Buffered writer that stores chunks in memory and writes them all during finalize This is simpler than StreamingBinaryWriter and suitable for tests and small files
Trait Implementations§
Source§impl BinaryFormatWriter for BufferedBinaryWriter
impl BinaryFormatWriter for BufferedBinaryWriter
Source§fn write_chunk(&mut self, chunk: ChunkFormat) -> Result<(), PipelineError>
fn write_chunk(&mut self, chunk: ChunkFormat) -> Result<(), PipelineError>
Writes a processed chunk (compressed/encrypted data) to the .adapipe
file
Source§fn write_chunk_at_position<'life0, 'async_trait>(
&'life0 self,
_chunk: ChunkFormat,
_sequence_number: u64,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_chunk_at_position<'life0, 'async_trait>(
&'life0 self,
_chunk: ChunkFormat,
_sequence_number: u64,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Writes a processed chunk at a specific position for concurrent
processing Read more
Source§fn finalize<'life0, 'async_trait>(
&'life0 self,
final_header: FileHeader,
) -> Pin<Box<dyn Future<Output = Result<u64, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn finalize<'life0, 'async_trait>(
&'life0 self,
final_header: FileHeader,
) -> Pin<Box<dyn Future<Output = Result<u64, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finalizes the .adapipe file by writing the footer with complete metadata Read more
Source§fn bytes_written(&self) -> u64
fn bytes_written(&self) -> u64
Gets the current number of bytes written
Source§fn chunks_written(&self) -> u32
fn chunks_written(&self) -> u32
Gets the current number of chunks written
Auto Trait Implementations§
impl Freeze for BufferedBinaryWriter
impl RefUnwindSafe for BufferedBinaryWriter
impl Send for BufferedBinaryWriter
impl Sync for BufferedBinaryWriter
impl Unpin for BufferedBinaryWriter
impl UnwindSafe for BufferedBinaryWriter
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