1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use failure::Error;
#[macro_use]
pub mod macros;
#[cfg(feature = "bincode")]
pub mod bincode;
#[cfg(feature = "cbor")]
pub mod cbor;
pub mod json;
#[cfg(feature = "msgpack")]
pub mod msgpack;
pub mod nothing;
#[cfg(feature = "toml")]
pub mod toml;
#[cfg(feature = "yaml")]
pub mod yaml;
#[cfg(feature = "bincode")]
pub use self::bincode::Bincode;
#[cfg(feature = "cbor")]
pub use self::cbor::Cbor;
pub use self::json::Json;
#[cfg(feature = "msgpack")]
pub use self::msgpack::MsgPack;
pub use self::nothing::Nothing;
#[cfg(feature = "toml")]
pub use self::toml::Toml;
#[cfg(feature = "yaml")]
pub use self::yaml::Yaml;
pub type Text = Result<String, Error>;
pub type Binary = Result<Vec<u8>, Error>;
#[doc(hidden)]
pub type Format<T> = Result<T, Error>;