compio_buf

Trait SetBufInit

Source
pub trait SetBufInit {
    // Required method
    unsafe fn set_buf_init(&mut self, len: usize);
}
Expand description

A helper trait for set_len like methods.

Required Methods§

Source

unsafe fn set_buf_init(&mut self, len: usize)

Set the buffer length. If len is less than the current length, nothing should happen.

§Safety

len should be less or equal than buf_capacity().

Implementations on Foreign Types§

Source§

impl SetBufInit for BorrowedBuf<'static>

Available on crate feature read_buf only.
Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl SetBufInit for BytesMut

Available on crate feature bytes only.
Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl SetBufInit for [u8]

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<A: Allocator + 'static> SetBufInit for Vec<u8, A>

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<B: SetBufInit + ?Sized> SetBufInit for &'static mut B

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<B: SetBufInit + ?Sized, A: Allocator + 'static> SetBufInit for Box<B, A>

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<T: IoBufMut> SetBufInit for [T]

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<T: IoBufMut, A: Allocator + 'static> SetBufInit for Vec<T, A>

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<T: IoBufMut, const N: usize> SetBufInit for [T; N]

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<T: IoBufMut, const N: usize> SetBufInit for ArrayVec<T, N>

Available on crate feature arrayvec only.
Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<T: IoBufMut, const N: usize> SetBufInit for SmallVec<[T; N]>
where [T; N]: Array<Item = T>,

Available on crate feature smallvec only.
Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<const N: usize> SetBufInit for ArrayVec<u8, N>

Available on crate feature arrayvec only.
Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

impl<const N: usize> SetBufInit for SmallVec<[u8; N]>
where [u8; N]: Array<Item = u8>,

Available on crate feature smallvec only.
Source§

unsafe fn set_buf_init(&mut self, len: usize)

Source§

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

Source§

unsafe fn set_buf_init(&mut self, len: usize)

Implementors§