Struct framing::Reassembler
zaun_community_protocol::framing::Reassembler · Struct
pub struct Reassembler { … }Per-connection reassembly state machine.
Methods
Section titled “Methods”pub fn new() -> SelfA reassembler with the protocol’s max_frame (MAX_FRAME).
with_max_frame
Section titled “with_max_frame”pub fn with_max_frame(max_frame: usize) -> SelfA reassembler with a stricter host max_frame; never above MAX_FRAME.
expire
Section titled “expire”pub fn expire(&mut self, now_ms: u64) -> usizeDiscards reassemblies whose first fragment arrived more than 60 s before now_ms
(exactly 60 s is still accepted). Returns how many were discarded.
pub fn push(&mut self, fragment: Fragment<'_>, now_ms: u64) -> PushedPushes one fragment received at now_ms. Expired reassemblies are discarded first.
open_count
Section titled “open_count”pub fn open_count(&self) -> usizeNumber of open reassemblies (≤ MAX_OPEN_REASSEMBLIES).
buffered_bytes
Section titled “buffered_bytes”pub fn buffered_bytes(&self) -> usizeChunk bytes currently buffered (≤ MAX_OPEN_REASSEMBLIES × max_frame).
Trait implementations
Section titled “Trait implementations”Debug, Default