Module bytes

Source
Expand description

Payload primitives

The ZBytes type is Zenoh’s representation of raw byte data. It provides mechanisms for zero-copy creation and access (From<Vec<u8>> and ZBytes::slices), as well as methods for sequential reading/writing (ZBytes::reader, ZBytes::writer).

Thezenoh_ext crate provides serialization and deserialization of basic types and structures for ZBytes z_serialize / z_deserialize.

Structs§

Encoding
Default encoding values used by Zenoh.
OptionZBytes
Wrapper type for API ergonomicity to allow any type T to be converted into Option<ZBytes> where T implements Into<ZBytes>.
ZBytes
ZBytes contains the serialized bytes of user data.
ZBytesReader
A reader that implements std::io::Read trait to deserialize from a ZBytes.
ZBytesSliceIterator
An iterator to iterate on raw bytes slices contained in a ZBytes.
ZBytesWriter
A writer that implements std::io::Write trait to serialize into a ZBytes.