#xdr #deserialize #serde #serialization

serde-xdr

XDR serialization and deserialization for Serde

7 releases (breaking)

0.6.0 Nov 23, 2020
0.5.1 Mar 29, 2019
0.5.0 Dec 14, 2017
0.4.0 Oct 27, 2017
0.1.0 Oct 3, 2017

#730 in Encoding

Download history 21/week @ 2023-12-04 19/week @ 2023-12-11 39/week @ 2023-12-18 23/week @ 2023-12-25 37/week @ 2024-01-01 49/week @ 2024-01-08 42/week @ 2024-01-15 28/week @ 2024-01-22 48/week @ 2024-01-29 43/week @ 2024-02-05 73/week @ 2024-02-12 61/week @ 2024-02-19 63/week @ 2024-02-26 49/week @ 2024-03-04 96/week @ 2024-03-11 116/week @ 2024-03-18

326 downloads per month
Used in 10 crates (7 directly)

GPL-3.0 license

105KB
3K SLoC

XDR serialization and deserialization for Serde

This crate implements serialization and deserialization of the External Data Representation Standard (XDR) for the Serde serialization and deserialization framework.

Usage

To use the official version published on crates.io, add the following to your Cargo.toml file:

[dependencies]
serde-xdr = "0.6"

To serialize and deserialize data, you can use the provided helper functions:

  • xdr_serde::from_bytes(&mut bytes) -> Result<T>
  • xdr_serde::from_reader(&mut reader) -> Result<T>
  • xdr_serde::to_bytes(&object_to_serialize) -> Result<Vec<u8>>
  • xdr_serde::to_writer(&mut writer, &object_to_serialize) -> Result<()>

A more complete example is available in the documentation.

Status

This crate should not be considered stable before more thorough real-world tests have been made. If you find any bugs or inconsistencies, please report them as GitHub issues.

One thing that is currently lacking tests is serialization and deserialization failure conditions.

Documentation also could be improved.

Dependencies

~2MB
~44K SLoC