pub trait ExpandBuffer: AsRef<[u8]> + AsMut<[u8]> {
// Required methods
fn buf_capacity(&self) -> usize;
fn buf_resize(&mut self, new_len: usize, value: u8);
fn buf_extend_from_slice(&mut self, src: &[u8]);
}Required Methods§
fn buf_capacity(&self) -> usize
fn buf_resize(&mut self, new_len: usize, value: u8)
fn buf_extend_from_slice(&mut self, src: &[u8])
Implementations on Foreign Types§
Source§impl ExpandBuffer for &mut Vec<u8>
Available on Linux and non-target_env=ohos only.
impl ExpandBuffer for &mut Vec<u8>
Available on Linux and non-
target_env=ohos only.fn buf_capacity(&self) -> usize
fn buf_resize(&mut self, new_len: usize, value: u8)
fn buf_extend_from_slice(&mut self, extend: &[u8])
Source§impl ExpandBuffer for &mut BytesMut
Available on Linux and non-target_env=ohos only.
impl ExpandBuffer for &mut BytesMut
Available on Linux and non-
target_env=ohos only.fn buf_capacity(&self) -> usize
fn buf_resize(&mut self, new_len: usize, value: u8)
fn buf_extend_from_slice(&mut self, extend: &[u8])
Source§impl ExpandBuffer for Vec<u8>
Available on Linux and non-target_env=ohos only.
impl ExpandBuffer for Vec<u8>
Available on Linux and non-
target_env=ohos only.fn buf_capacity(&self) -> usize
fn buf_resize(&mut self, new_len: usize, value: u8)
fn buf_extend_from_slice(&mut self, extend: &[u8])
Source§impl ExpandBuffer for BytesMut
Available on Linux and non-target_env=ohos only.
impl ExpandBuffer for BytesMut
Available on Linux and non-
target_env=ohos only.