pub trait RxBuffer {
// Required methods
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] ⓘ;
// Provided method
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§
Sourcefn as_c_void(&mut self) -> (*mut c_void, size_t)
fn as_c_void(&mut self) -> (*mut c_void, size_t)
Returns a void*/size_t pair to be used in the C call.
Provided Methods§
Sourcefn can_set_capacity(&mut self) -> Option<&mut dyn ResizeableBuffer>
fn can_set_capacity(&mut self) -> Option<&mut dyn ResizeableBuffer>
Get a ‘Some(ResizeableBuffer)’ when the underlying Buffer supports allocating more memory