pub trait Read {
type Chunk: SplitByteSlice;
// Required methods
fn next_chunk(&mut self) -> ParseResult<Self::Chunk>;
fn chunks_len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
An iterator over contiguous byte slices which can be parsed as a packet.
Required Associated Types§
Sourcetype Chunk: SplitByteSlice
type Chunk: SplitByteSlice
The type of each byte slice.
Required Methods§
Sourcefn next_chunk(&mut self) -> ParseResult<Self::Chunk>
fn next_chunk(&mut self) -> ParseResult<Self::Chunk>
Attempts to fetch the next available byte slice from self.
Sourcefn chunks_len(&self) -> usize
fn chunks_len(&self) -> usize
Returns the number of segments remaining.