pub struct Chunk(/* private fields */);Expand description
A “chunk” is an arbitrarily sized byte slice read from the underlying stream.
The slices’ length is at max of the previously configured maximum chunk_size.
We use the word “chunk”, as it is often used when processing collections in segments or when dealing with buffered I/O operations where data arrives in variable-sized pieces.
In contrast to this, a “frame” typically carries more specific semantics. It usually implies a complete logical unit with defined boundaries within a protocol or format. This we do not have here.
Note: If the underlying stream is of lower buffer size, chunks of full chunk_size length may
never be observed.
Trait Implementations§
impl Eq for Chunk
impl StructuralPartialEq for Chunk
Auto Trait Implementations§
impl !Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnsafeUnpin for Chunk
impl UnwindSafe for Chunk
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