Struct smoltcp::storage::Assembler
[−]
[src]
pub struct Assembler { /* fields omitted */ }
A buffer (re)assembler.
Currently, up to a hardcoded limit of four holes can be tracked in the buffer.
Methods
impl Assembler
[src]
fn new(size: usize) -> Assembler
[src]
Create a new buffer assembler for buffers of the given size.
fn is_empty(&self) -> bool
[src]
Return whether the assembler contains no data.
fn add(&mut self, offset: usize, size: usize) -> Result<(), ()>
[src]
Add a new contiguous range to the assembler, and return Ok(())
,
or return Err(())
if too many discontiguities are already recorded.
fn remove_front(&mut self) -> Option<usize>
[src]
Remove a contiguous range from the front of the assembler and Some(data_size)
,
or return None
if there is no such range.