Bytes::from_vec
pub static fn from_vec(Vec<byte> buf) -> Bytes Import
Source: use bytes::{Bytes}; src/bytes.hy Wraps buf without copying it.
Parameters#
| Name | Type |
|---|---|
buf | Vec<byte> |
Returns#
Bytes
See also#
Bytes: A wrapper around aVec<byte>, for APIs that want a distinct byte-buffer type.Bytes::to_vec: Returns the wrapped buffer.