pub trait RxBuffer {
    fn capacity(&self) -> usize;
fn as_c_void(&mut self) -> (*mut c_void, size_t);
fn as_c_char(&mut self) -> (*mut c_char, size_t);
unsafe fn done(&mut self, len: size_t) -> &mut [u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]; fn can_set_capacity(&mut self) -> Option<&mut dyn ResizeableBuffer> { ... } }
Expand description

The ‘RxBuffer’ is a used when reading data in. The contents of the buffer can be uninitialized.

Required methods

The allocated size

Returns a void*/size_t pair to be used in the C call.

Returns a char*/size_t pair to be used in the C call.

After the reading operation is done the buffer must be sealed with the actual length of the data retrieved. This function returns a slice into the buffer containing the data.

Provided methods

Get a ‘Some(ResizeableBuffer)’ when the underlying Buffer supports allocating more memory

Implementations on Foreign Types

Implementors