libvirt-xdr
XDR (External Data Representation) serialization/deserialization for libvirt protocol.
This crate provides serde-based XDR encoding/decoding as specified in RFC 4506, specifically tailored for the libvirt RPC protocol.
Features
- Serde-based serializer and deserializer
- Support for all XDR primitive types (int, uint, hyper, bool, string, opaque, etc.)
- Special handling for fixed-length opaque data (UUID)
- 4-byte alignment and padding
Usage
use ;
// Serialize to XDR
let data = MyStruct ;
let bytes = to_bytes?;
// Deserialize from XDR
let decoded: MyStruct = from_bytes?;
License
MIT OR Apache-2.0