Skip to main content

Chunker

Trait Chunker 

Source
pub trait Chunker {
    // Required method
    fn next(&mut self, buf: &mut BytesMut) -> Option<Chunk>;
}

Required Methods§

Source

fn next(&mut self, buf: &mut BytesMut) -> Option<Chunk>

Scan for the next chunk in the given buffer.

If None is returned the caller is expected to append more data to the buffer and call again. If a chunk is returned then that chunk has been split from buffer and next() can be called again.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Chunker for FixedSizeChunker

Source§

impl<H> Chunker for RollingHashChunker<H>
where H: RollingHash,