Trait lepton_mux::StreamMuxer[][src]

pub trait StreamMuxer<AllocU8: Allocator<u8>> {
    fn write(
        &mut self,
        stream_id: StreamID,
        data: &[u8],
        alloc_u8: &mut AllocU8
    ) -> usize;
fn write_buffer(
        &mut self,
        stream_id: StreamID,
        alloc_u8: &mut AllocU8
    ) -> WritableBytes;
fn serialize(&mut self, output: &mut [u8]) -> usize;
fn flush(&mut self, output: &mut [u8]) -> usize;
fn wrote_eof(&self) -> bool;
fn free(&mut self, alloc_u8: &mut AllocU8);
fn n_stream(&self) -> usize; fn can_serialize() -> bool { ... } }

Required Methods

Writes data to the specified stream.

Returns an array of n_stream WritableBytes. Each WritableByte is connected to the buffer of its corresponding stream.

Populate output with content buffered by each stream in a "fair" manner.

Provided Methods

Implementors