Expand description
Logo by Misiasart
Thanks to all individual and corporate sponsors, without whom this work could not exist:
§facet-xdr
An XDR serializer and deserializer based on facet
§Reference
| XDR IDL | Rust |
|---|---|
int | i32 |
unsigned int | u32 |
enum | Unit enum |
bool | bool |
hyper | i64 |
unsigned hyper | u64 |
float | f32 |
double | f64 |
quadruple | Not currently supported |
opaque [n] | [u8; N] |
opaque<> | Vec<u8> or &[u8] |
string<> | String |
Fixed length array [n] | [T; N] |
Variable length array <> | Vec<T> or &[T] |
struct | struct |
union | enum |
void | Unit struct or unit variant |
* (optional-data) | Option |
§License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Enums§
- XdrDeser
Error - Errors when deserializing from XDR bytes
- XdrSer
Error - Errors when serializing to XDR bytes
Functions§
- deserialize
- Deserialize a slice of XDR bytes into any Facet type
- deserialize_
wip - Deserialize an XDR slice given some some
Partialinto aHeapValue - to_vec
- Serialize any Facet type to XDR bytes