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§
Sourceunsafe fn set_buf_init(&mut self, len: usize)
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.
impl SetBufInit for BorrowedBuf<'static>
Available on crate feature
read_buf
only.unsafe fn set_buf_init(&mut self, len: usize)
Source§impl SetBufInit for BytesMut
Available on crate feature bytes
only.
impl SetBufInit for BytesMut
Available on crate feature
bytes
only.unsafe fn set_buf_init(&mut self, len: usize)
Source§impl SetBufInit for [u8]
impl SetBufInit for [u8]
unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<A: Allocator + 'static> SetBufInit for Vec<u8, A>
impl<A: Allocator + 'static> SetBufInit for Vec<u8, A>
unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<B: SetBufInit + ?Sized> SetBufInit for &'static mut B
impl<B: SetBufInit + ?Sized> SetBufInit for &'static mut B
unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<B: SetBufInit + ?Sized, A: Allocator + 'static> SetBufInit for Box<B, A>
impl<B: SetBufInit + ?Sized, A: Allocator + 'static> SetBufInit for Box<B, A>
unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<T: IoBufMut> SetBufInit for [T]
impl<T: IoBufMut> SetBufInit for [T]
unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<T: IoBufMut, A: Allocator + 'static> SetBufInit for Vec<T, A>
impl<T: IoBufMut, A: Allocator + 'static> SetBufInit for Vec<T, A>
unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<T: IoBufMut, const N: usize> SetBufInit for [T; N]
impl<T: IoBufMut, const N: usize> SetBufInit for [T; N]
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.
impl<T: IoBufMut, const N: usize> SetBufInit for ArrayVec<T, N>
Available on crate feature
arrayvec
only.unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<T: IoBufMut, const N: usize> SetBufInit for SmallVec<[T; N]>
Available on crate feature smallvec
only.
impl<T: IoBufMut, const N: usize> SetBufInit for SmallVec<[T; N]>
Available on crate feature
smallvec
only.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.
impl<const N: usize> SetBufInit for ArrayVec<u8, N>
Available on crate feature
arrayvec
only.unsafe fn set_buf_init(&mut self, len: usize)
Source§impl<const N: usize> SetBufInit for SmallVec<[u8; N]>
Available on crate feature smallvec
only.
impl<const N: usize> SetBufInit for SmallVec<[u8; N]>
Available on crate feature
smallvec
only.