pub struct Buffer(/* private fields */);
Implementations§
Source§impl Buffer
impl Buffer
Sourcepub fn build<T: AsRef<[U]>, U: AsRef<[u8]>>(parts: T) -> Self
pub fn build<T: AsRef<[U]>, U: AsRef<[u8]>>(parts: T) -> Self
Build a buffer from parts that resolve to a slice of byte slices.
A size hint will be calculated from the parts to preallocate the buffer.
Sourcepub fn build_with_size_hint<T: AsRef<[U]>, U: AsRef<[u8]>>(
parts: T,
size_hint: usize,
) -> Self
pub fn build_with_size_hint<T: AsRef<[U]>, U: AsRef<[u8]>>( parts: T, size_hint: usize, ) -> Self
Build a buffer from parts that resolve to a slice of byte slices.
Sourcepub fn into_inner(self) -> Vec<u8> ⓘ
pub fn into_inner(self) -> Vec<u8> ⓘ
Get the inner Vec<u8>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more