MCPcopy Create free account
hub / github.com/RustCrypto/utils / ReadBuffer

Class ReadBuffer

block-buffer/src/read.rs:5–10  ·  view source on GitHub ↗

Buffer for reading block-generated data.

Source from the content-addressed store, hash-verified

3
4/// Buffer for reading block-generated data.
5pub struct ReadBuffer<BS: BlockSizes> {
6 /// The first byte of the block is used as cursor position.
7 /// `&buffer[usize::from(buffer[0])..]` is interpreted as unread bytes.
8 /// The cursor position is always bigger than zero and smaller than or equal to block size.
9 buffer: Array<u8, BS>,
10}
11
12impl<BS: BlockSizes> fmt::Debug for ReadBuffer<BS> {
13 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected