serde_helpers/
lib.rs

1//! # serde-helpers
2//!
3//! `serde-helpers` provides wrappers for serializing and deserializing data structures
4//! to and from certain data formats.
5//!
6//! The library is primarily intended to keep crates that need to serialize or deserialize
7//! data from having to be aware of `serde` itself, if they do not otherwise have a need
8//! to consume it.
9//!
10//! Additionally, `serde-helpers` provides some additional consistency across data formats,
11//! e.g., by providing a single, consolidated `Error` struct that wraps the format-specific
12//! error.
13extern crate serde;
14#[cfg(feature = "serde_json")]
15extern crate serde_json;
16#[cfg(feature = "serde_yaml")]
17extern crate serde_yaml;
18
19pub use error::{Error, ErrorKind};
20#[cfg(feature = "serde_json")]
21pub use json::{DeserializeJson, SerializeJson};
22#[cfg(feature = "serde_yaml")]
23pub use yaml::{DeserializeYaml, SerializeYaml};
24
25mod error;
26#[cfg(feature = "serde_json")]
27mod json;
28#[cfg(feature = "serde_yaml")]
29mod yaml;