pub struct DevNull<AllocU8: Allocator<u8>> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<AllocU8: Allocator<u8>> StreamDemuxer<AllocU8> for DevNull<AllocU8>
impl<AllocU8: Allocator<u8>> StreamDemuxer<AllocU8> for DevNull<AllocU8>
Source§fn deserialize(&mut self, data: &[u8], _alloc_u8: &mut AllocU8) -> usize
fn deserialize(&mut self, data: &[u8], _alloc_u8: &mut AllocU8) -> usize
Demultiplexes
data into streams.Source§fn read_buffer(&mut self, stream_id: StreamID) -> ReadableBytes<'_>
fn read_buffer(&mut self, stream_id: StreamID) -> ReadableBytes<'_>
Returns an array of
n_stream ReadableBytes. Each ReadableByte is connected to
the buffer of its corresponding stream.fn data_len(&self, _stream_id: StreamID) -> usize
fn data(&self, _stream_id: StreamID) -> &[u8] ⓘ
fn editable_data( &mut self, _stream_id: StreamID, ) -> &mut AllocatedMemoryRange<u8, AllocU8>
fn consume_data(&mut self, _stream_id: StreamID, count: usize)
fn consumed_all_streams_until_eof(&self) -> bool
fn encountered_eof(&self) -> bool
fn free(&mut self, _alloc_u8: &mut AllocU8)
fn n_stream(&self) -> usize
Source§impl<AllocU8: Allocator<u8>> StreamMuxer<AllocU8> for DevNull<AllocU8>
impl<AllocU8: Allocator<u8>> StreamMuxer<AllocU8> for DevNull<AllocU8>
Source§fn write_buffer(
&mut self,
stream_id: StreamID,
_alloc_u8: &mut AllocU8,
) -> WritableBytes<'_>
fn write_buffer( &mut self, stream_id: StreamID, _alloc_u8: &mut AllocU8, ) -> WritableBytes<'_>
Returns an array of
n_stream WritableBytes. Each WritableByte is connected to
the buffer of its corresponding stream.Source§fn write(
&mut self,
_stream_id: StreamID,
data: &[u8],
_alloc_u8: &mut AllocU8,
) -> usize
fn write( &mut self, _stream_id: StreamID, data: &[u8], _alloc_u8: &mut AllocU8, ) -> usize
Writes
data to the specified stream.fn can_serialize() -> bool
Source§fn serialize(&mut self, _output: &mut [u8]) -> usize
fn serialize(&mut self, _output: &mut [u8]) -> usize
Populate
output with content buffered by each stream in a “fair” manner.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
Auto Trait Implementations§
impl<AllocU8> Freeze for DevNull<AllocU8>
impl<AllocU8> RefUnwindSafe for DevNull<AllocU8>
impl<AllocU8> Send for DevNull<AllocU8>
impl<AllocU8> Sync for DevNull<AllocU8>
impl<AllocU8> Unpin for DevNull<AllocU8>
impl<AllocU8> UnwindSafe for DevNull<AllocU8>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more