Struct smoltcp::storage::Assembler [−][src]
pub struct Assembler { /* fields omitted */ }
Expand description
A buffer (re)assembler.
Currently, up to a hardcoded limit of 4 or 32 holes can be tracked in the buffer.
Implementations
Create a new buffer assembler for buffers of the given size.
Add a new contiguous range to the assembler, and return Ok(())
,
or return Err(())
if too many discontiguities are already recorded.
Remove a contiguous range from the front of the assembler and Some(data_size)
,
or return None
if there is no such range.
Iterate over all of the contiguous data ranges.
This is used in calculating what data ranges have been received. The offset indicates the number of bytes of contiguous data received before the beginnings of this Assembler.
Data Hole Data |— 100 —|— 200 —|— 100 —|
An offset of 1500 would return the ranges: (1500, 1600), (1800, 1900)