Module bytes Copy item path Source pub use reader::BytesReader ;
pub use writer::BytesWriter ;
reader 🔒 writer 🔒 EMPTY_BYTES 🔒 8 null bytes, used to write out padding. LEN_SIZE 🔒 The length of the size field, in bytes is always 8. assume_init_bytes 🔒 ⚠ SAFETY: The bytes have to actually be initialized. padding_len 🔒 Computes the number of bytes we should add to len (a length in
bytes) to be aligned on 64 bits (8 bytes). read_bytes Read a “bytes wire packet” from the AsyncRead.
Rejects reading more than allowed_size
bytes of payload. read_bytes_buf 🔒 read_string Read a “bytes wire packet” of from the AsyncRead and tries to parse as string.
Internally uses read_bytes .
Rejects reading more than allowed_size
bytes of payload. write_bytes Writes a “bytes wire packet” to a (hopefully buffered) AsyncWriteExt .