pub struct BasicChunker<W> { /* private fields */ }
Expand description
The simplest chunker to concat all files and slice data at block size.
This does no deduplication.
Implementations§
Source§impl<W> BasicChunker<W>
impl<W> BasicChunker<W>
Sourcepub fn new(
w: Writer<W>,
block_size: NonZero<u32>,
compression: CompressParam,
) -> Self
pub fn new( w: Writer<W>, block_size: NonZero<u32>, compression: CompressParam, ) -> Self
Create a basic chunker with given section writer and parameters.
Note: block_size
must match the block size configured for
crate::metadata::Builder
. You should always get it from
crate::metadata::Builder::block_size
.
Trait Implementations§
Source§impl<W: Write> Chunker for BasicChunker<W>
impl<W: Write> Chunker for BasicChunker<W>
Source§fn put_reader(&mut self, rdr: &mut dyn Read) -> Result<Vec<Chunk>>
fn put_reader(&mut self, rdr: &mut dyn Read) -> Result<Vec<Chunk>>
Put data via a
Read
instance into the archive, and return the
chunking result ready for crate::metadata::Builder::put_file
.Auto Trait Implementations§
impl<W> Freeze for BasicChunker<W>where
W: Freeze,
impl<W> !RefUnwindSafe for BasicChunker<W>
impl<W> Send for BasicChunker<W>where
W: Send,
impl<W> Sync for BasicChunker<W>where
W: Sync,
impl<W> Unpin for BasicChunker<W>where
W: Unpin,
impl<W> !UnwindSafe for BasicChunker<W>
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