Skip to main content

SegmenterExt

Trait SegmenterExt 

Source
pub trait SegmenterExt: Sink<Segment> {
    // Provided methods
    fn segmenter<const C: usize>(self, frame_size: usize) -> Segmenter<C, Self>
       where Self: Sized,
             Self::Error: Error + Send + Sync + 'static { ... }
    fn segmenter_with_terminating_segment<const C: usize>(
        self,
        frame_size: usize,
    ) -> Segmenter<C, Self>
       where Self: Sized,
             Self::Error: Error + Send + Sync + 'static { ... }
}
Expand description

Sink extension methods for segmenting binary data into a sink.

Provided Methods§

Source

fn segmenter<const C: usize>(self, frame_size: usize) -> Segmenter<C, Self>
where Self: Sized, Self::Error: Error + Send + Sync + 'static,

Attaches a Segmenter to the underlying sink.

Source

fn segmenter_with_terminating_segment<const C: usize>( self, frame_size: usize, ) -> Segmenter<C, Self>
where Self: Sized, Self::Error: Error + Send + Sync + 'static,

Attaches a Segmenter to the underlying sink. The Segmenter also sends a terminating when closed.

Implementors§

Source§

impl<T> SegmenterExt for T
where T: Sink<Segment> + ?Sized,