Crate flexpiler[−][src]
Expand description
Flexpiler
A library that aims to maximize customisation of serialization.
Most notably this library provides the derive macro flexpiler::Deserialize
as well as some common
implementations in the flexpiler::common
namespace.
Currently the project only supports deserialization of a format that mirrors how structs and enums are initialized in the rust language.
examples
#[derive(flexpiler::Deserialize)]
struct Example {
field_i32: i32,
}
let mut string_reader = flexpiler::common::reader::String::from("Example{ field_i32: 5 }");
let example = match Example::deserialize(&mut string_reader) {
Ok(example) => example,
Err(error) => {
assert!(false, "deserialisation failed: {}", error);
}
};
assert_eq!(example.field_i32, 5);
Re-exports
pub use error::Error;
Modules
Traits
A trait that associates a type with its flexpiler Deseriaizer type
A trait that makes a type support the flexpiler deserialize(reader) function.