Skip to main content

DataBuffer

Trait DataBuffer 

Source
pub trait DataBuffer: Send + 'static {
    // Required methods
    fn mut_ptr_slice(&mut self) -> MutPtrByteSlice<'_>;
    fn commit(&mut self, size: usize) -> Result<(), ChunkedArchiveError>;
}
Expand description

Trait for destination buffers where uncompressed or decompressed blob data is written.

Required Methods§

Source

fn mut_ptr_slice(&mut self) -> MutPtrByteSlice<'_>

Returns a raw pointer slice to the remaining uncommitted memory in this allocation.

Source

fn commit(&mut self, size: usize) -> Result<(), ChunkedArchiveError>

Incrementally commits size bytes of data within this allocation, advancing the start of the remaining memory returned by subsequent calls to [mut_ptr_slice].

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§