DevNull

Struct DevNull 

Source
pub struct DevNull<AllocU8: Allocator<u8>> { /* private fields */ }

Implementations§

Source§

impl<AllocU8: Allocator<u8>> DevNull<AllocU8>

Source

pub fn new(n_stream: usize) -> Self

Source

pub fn n_stream(&self) -> usize

Trait Implementations§

Source§

impl<AllocU8: Allocator<u8>> Default for DevNull<AllocU8>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<AllocU8: Allocator<u8>> StreamDemuxer<AllocU8> for DevNull<AllocU8>

Source§

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<'_>

Returns an array of n_stream ReadableBytes. Each ReadableByte is connected to the buffer of its corresponding stream.
Source§

fn data_len(&self, _stream_id: StreamID) -> usize

Source§

fn data(&self, _stream_id: StreamID) -> &[u8]

Source§

fn editable_data( &mut self, _stream_id: StreamID, ) -> &mut AllocatedMemoryRange<u8, AllocU8>

Source§

fn consume_data(&mut self, _stream_id: StreamID, count: usize)

Source§

fn consumed_all_streams_until_eof(&self) -> bool

Source§

fn encountered_eof(&self) -> bool

Source§

fn free(&mut self, _alloc_u8: &mut AllocU8)

Source§

fn n_stream(&self) -> usize

Source§

impl<AllocU8: Allocator<u8>> StreamMuxer<AllocU8> for DevNull<AllocU8>

Source§

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

Writes data to the specified stream.
Source§

fn can_serialize() -> bool

Source§

fn serialize(&mut self, _output: &mut [u8]) -> usize

Populate output with content buffered by each stream in a “fair” manner.
Source§

fn flush(&mut self, _output: &mut [u8]) -> usize

Source§

fn wrote_eof(&self) -> bool

Source§

fn free(&mut self, _alloc_u8: &mut AllocU8)

Source§

fn n_stream(&self) -> usize

Auto Trait Implementations§

§

impl<AllocU8> Freeze for DevNull<AllocU8>
where <AllocU8 as Allocator<u8>>::AllocatedMemory: Freeze,

§

impl<AllocU8> RefUnwindSafe for DevNull<AllocU8>
where <AllocU8 as Allocator<u8>>::AllocatedMemory: RefUnwindSafe, AllocU8: RefUnwindSafe,

§

impl<AllocU8> Send for DevNull<AllocU8>
where <AllocU8 as Allocator<u8>>::AllocatedMemory: Send, AllocU8: Send,

§

impl<AllocU8> Sync for DevNull<AllocU8>
where <AllocU8 as Allocator<u8>>::AllocatedMemory: Sync, AllocU8: Sync,

§

impl<AllocU8> Unpin for DevNull<AllocU8>
where <AllocU8 as Allocator<u8>>::AllocatedMemory: Unpin, AllocU8: Unpin,

§

impl<AllocU8> UnwindSafe for DevNull<AllocU8>
where <AllocU8 as Allocator<u8>>::AllocatedMemory: UnwindSafe, AllocU8: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.