About
Repository stores code for Rust library that allows to read from and write to .io file format.
Functions and plans
The current status of both serialization and deserialization:
- Primitive types
- Strings
- Arrays
- Vectors
- Hashmaps
- Structs (with named fields)
- Generics
- Combinations of all above
- Tuples
- Tuple structs
- &str type
- Slices
Capabilities
- Serialization of supported types using macro to_io!() using objects reference,
- Deserialization of supported types using macro from_io!() using .io formatted String and wanted objects type,
- Only decorative! support for renaming fields in struct in and from .io formatted String using #[io_name()] helper macro using String literal as argument.
See example below for usage of those capabilities.
Example usage
use *; // required import
// required macro derive IoDeSer, Debug is not required
// required macro derive, Debug is not required
/*
Output:
|
Name->|John|
LastName->|Kowalski|
Age->|21|
Address->|
city->|Warsaw|
number->|65|
street->|Tęczowa|
|
|
Person { name: "John", last_name: "Kowalski", age: 21, address: Address { city: "Warsaw", number: 65, street: "Tęczowa" } }
*/