rsomeip-bytes
Serialization according to the SOME/IP on-wire format.
This crate provides traits and types to assist in correctly implementing the serialization and deserialization of data types according to the Open SOME/IP Specification.
Getting started
-
Add
rsomeip-bytesas a dependency to your project.# Cargo.toml [] = "0.2.0" -
Implement
SerializeandDeserializefor your data types.use ; /// Example of a composite type that is used in a SOME/IP message payload. // A buffer can be any type that implements `Buf` and `BufMut`. let mut buffer = ; // Use the `Serialize` trait to write data to the buffer. let value = Foo ; assert_eq!; assert_eq!; // By default, data is serialized in Big Endian byte order. assert_eq!; // Use the `Deserialize` trait to read data from the buffer. assert_eq!; assert_eq!;
License
This project is licensed under either the Apache-2.0 License or MIT License, at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.