pub struct BatchContextGenerator { /* private fields */ }Expand description
Struct to generate BatchInflateContext objects for batch chunks.
Implementations§
Source§impl BatchContextGenerator
impl BatchContextGenerator
Sourcepub fn chunk_data_buf(&self) -> &Vec<u8> ⓘ
pub fn chunk_data_buf(&self) -> &Vec<u8> ⓘ
Get the buffer of to be dumped chunk data for batch chunk.
Sourcepub fn chunk_data_buf_is_empty(&self) -> bool
pub fn chunk_data_buf_is_empty(&self) -> bool
Check whether the chunk data buffer is empty.
Sourcepub fn chunk_data_buf_len(&self) -> usize
pub fn chunk_data_buf_len(&self) -> usize
Get the length of chunk data buffer.
Sourcepub fn append_chunk_data_buf(&mut self, chunk_data: &[u8])
pub fn append_chunk_data_buf(&mut self, chunk_data: &[u8])
Append new chunk data to the chunk data buffer.
Sourcepub fn clear_chunk_data_buf(&mut self)
pub fn clear_chunk_data_buf(&mut self)
Clear the chunk data buffer.
Sourcepub fn add_context(&mut self, compressed_size: u32)
pub fn add_context(&mut self, compressed_size: u32)
Add a batch context for a dumped batch chunk.
Sourcepub fn new(batch_size: u32) -> Result<Self>
pub fn new(batch_size: u32) -> Result<Self>
Create a new instance of BatchInflateContext.
Sourcepub fn generate_chunk_info(
&mut self,
compressed_offset: u64,
uncompressed_offset: u64,
uncompressed_size: u32,
encrypted: bool,
) -> Result<BlobChunkInfoV2Ondisk>
pub fn generate_chunk_info( &mut self, compressed_offset: u64, uncompressed_offset: u64, uncompressed_size: u32, encrypted: bool, ) -> Result<BlobChunkInfoV2Ondisk>
Generate and return a v2 chunk info struct.
Auto Trait Implementations§
impl Freeze for BatchContextGenerator
impl RefUnwindSafe for BatchContextGenerator
impl Send for BatchContextGenerator
impl Sync for BatchContextGenerator
impl Unpin for BatchContextGenerator
impl UnsafeUnpin for BatchContextGenerator
impl UnwindSafe for BatchContextGenerator
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