| Crates.io | sphalerite |
| lib.rs | sphalerite |
| version | 0.1.0 |
| created_at | 2023-11-07 12:39:48.372736+00 |
| updated_at | 2023-11-07 12:39:48.372736+00 |
| description | A dependency-free crate for binary serialization |
| homepage | |
| repository | https://github.com/Phil-hacker/sphalerite |
| max_upload_size | |
| id | 1028024 |
| size | 14,321 |
A dependency-less crate for simple binary serialization and deserialization in rust.
To use the crate simply install it using cargo
(cargo add sphalerite)
and implement the Transcode trait.
The Transcode trait implements following functions:
fn to_bytes(&self,_writer: &mut dyn std::io::Write) -> std::io::Result<usize>
fn from_bytes(&self,_reader: &mut dyn std::io::Read) -> std::io::Result<Self>
To serialize a variable call to_bytes and for deserialization call from_bytes