Available on crate feature
wire only.Re-exports§
pub use reader::BytesReader;pub use writer::BytesWriter;
Modules§
Constants§
- EMPTY_
BYTES 🔒 - 8 null bytes, used to write out padding.
- LEN_
SIZE 🔒 - The length of the size field, in bytes is always 8.
Functions§
- assume_
init_ 🔒 ⚠bytes async - 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_sizebytes of payload. - read_
bytes_ 🔒buf async - 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_sizebytes of payload. - write_
bytes - Writes a “bytes wire packet” to a (hopefully buffered) AsyncWriteExt.