Skip to main content

ReassemblerExt

Trait ReassemblerExt 

Source
pub trait ReassemblerExt: Stream<Item = Segment> {
    // Provided methods
    fn reassembler(
        self,
        timeout: Duration,
        capacity: usize,
    ) -> Reassembler<Self, FrameHashMap>
       where Self: Sized { ... }
    fn reassembler_with_inspector(
        self,
        timeout: Duration,
        capacity: usize,
        inspector: FrameInspector,
    ) -> Reassembler<Self, FrameDashMap>
       where Self: Sized { ... }
}
Expand description

Stream extension methods for frame reassembly.

Provided Methods§

Source

fn reassembler( self, timeout: Duration, capacity: usize, ) -> Reassembler<Self, FrameHashMap>
where Self: Sized,

Attaches a Reassembler with the given timeout for frame completion and capacity to this stream.

Source

fn reassembler_with_inspector( self, timeout: Duration, capacity: usize, inspector: FrameInspector, ) -> Reassembler<Self, FrameDashMap>
where Self: Sized,

Attaches a Reassembler with the given timeout for frame completion, capacity to this stream and FrameInspector.

Use only in situations where the FrameInspector is really needed, as such Reassembler is slower than a Reassembler without a FrameInspector.

Implementors§

Source§

impl<T> ReassemblerExt for T
where T: Stream<Item = Segment> + ?Sized,