Expand description
§Forma
Ground-up serialization and deserialization framework for Rust.
Forma defines a data model — 30 types that every Rust value maps to — and two pairs of traits that connect Rust types to data formats:
Serialize+Serializer— types describe themselves, formats write them.Deserialize+Deserializer— formats offer data, types accept it.
Built with the lessons of serde’s 10 years of issues in mind:
- Errors carry type context from the start.
Cow<'de, str>actually borrows when the format offers borrowed data.- f16 and f128 are in the data model.
- Recursion depth is tracked.
- Flatten and tagging are designed to work correctly from the ground up.
Re-exports§
pub use ser::Serialize;pub use ser::Serializer;pub use de::Deserialize;pub use de::Deserializer;pub use schema::JsonSchema;
Modules§
- content
- Content buffering for tagged enum deserialization.
- de
- Deserialization framework.
- error
- Error types for serialization and deserialization.
- schema
- JSON Schema generation from Rust types.
- ser
- Serialization framework.
Macros§
- forward_
to_ deserialize_ any - Generates forwarding impls that delegate
deserialize_*methods toDeserializer::deserialize_any.