Trait cbuffer::RxBuffer[][src]

pub trait RxBuffer: CBuffer {
    fn as_c_void(&mut self) -> (*mut c_void, size_t);
fn as_c_char(&mut self) -> (*mut c_char, size_t);
fn rx_done(&mut self, len: size_t) -> &[u8]; }

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

Required methods

fn as_c_void(&mut self) -> (*mut c_void, size_t)[src]

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

fn as_c_char(&mut self) -> (*mut c_char, size_t)[src]

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

fn rx_done(&mut self, len: size_t) -> &[u8][src]

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

Loading content...

Implementations on Foreign Types

impl RxBuffer for Vec<u8>[src]

impl<const N: usize> RxBuffer for [u8; N][src]

impl<const N: usize> RxBuffer for [MaybeUninit<u8>; N][src]

Loading content...

Implementors

Loading content...