Expand description
Encode a ZCP envelope to wire bytes.
Two encoding paths:
-
encode_to_slice— write into a caller-provided&mut [u8]. Works onno_stdwith no allocator. Returns the number of bytes written. -
encode_to_vec— allocate and return aVec<u8>. Requires theallocfeature.
Structs§
- Envelope
Fields - Parameters for encoding a single ZCP envelope.
Functions§
- encode_
to_ slice - Encode an envelope into a pre-allocated byte slice.
- encode_
to_ vec alloc - Encode an envelope and return an owned
Vec<u8>.