Docs.rs
wacore-binary-0.8.0
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Skip to main content
Module util
wacore_
binary
0.8.0
Module util
Module Items
Constants
Functions
In crate wacore_
binary
wacore_binary
Module
util
Copy item path
Source
Constants
§
FORMAT_
COMPRESSED
Set in the format byte when the node bytes after it are zlib-compressed. Only inbound payloads ever set it.
FORMAT_
PLAIN
A plaintext frame is a format byte followed by the node bytes the decoder reads. The byte is a flag set with a single defined bit,
FORMAT_COMPRESSED
;
FORMAT_PLAIN
is the uncompressed form and the only one we emit.
Functions
§
check_
plain_
payload
Check that
data
is a packed payload in the form we produce: a
FORMAT_PLAIN
byte followed by at least one node byte.
pack
Prefix node bytes with the format byte: the inverse of
unpack
, turning a buffer the decoder consumed back into one a send path accepts.
unpack
Strip the format byte from a packed payload, decompressing the node bytes when it says they are.
unpack_
bytes
Unpack a network payload into an owned
Bytes
buffer.