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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! Apple property-list serialization for Rust: XML, binary (`bplist00`),
//! OpenStep, and GNUStep — encode and decode.
//!
//! `apple-plist` is a serde-native Rust library for Apple property lists.
//! Unlike most Rust plist crates it targets **all four** Apple property-list
//! dialects in both directions, handling the edge cases that show up in
//! real-world files.
//!
//! # Quick start
//!
//! Decoding auto-detects the format; encoding picks the format you name:
//!
//! ```
//! use apple_plist::{Format, Value, detect};
//!
//! let bytes = apple_plist::to_vec(&true, Format::Xml)?;
//! assert!(bytes.ends_with(b"<true/></plist>"));
//!
//! let value: Value = apple_plist::from_slice(&bytes)?;
//! assert_eq!(value, Value::Boolean(true));
//! assert_eq!(detect(&bytes), Some(Format::Xml));
//! # Ok::<(), apple_plist::Error>(())
//! ```
//!
//! Streaming and `Value`-tree variants live on [`Encoder`] and [`Decoder`];
//! both compile with every feature combination and work without `serde`.
//!
//! # Status
//!
//! The full surface is implemented: the core data model ([`Value`] and its
//! nine cases, [`Integer`], [`Real`], [`Date`], [`Uid`], the [`Error`]
//! model, [`Format`], the depth bound), all four codecs behind their feature
//! gates, format auto-detection ([`detect`], the XML-to-text retry ladder),
//! and the serde bridge ([`to_vec`], [`from_slice`], [`to_value`],
//! [`from_value`], and friends).
//!
//! # Cargo features
//!
//! All on by default; every combination compiles and features only add API:
//!
//! - `serde` — derive-driven (de)serialization: [`Encoder::encode`],
//! [`Decoder::decode`], and the free functions [`to_vec`],
//! [`to_vec_indent`], [`to_writer`], [`from_slice`], [`from_reader`],
//! [`to_value`], [`from_value`].
//! - `xml` — the XML codec.
//! - `binary` — the binary (`bplist00`) codec.
//! - `openstep` — the OpenStep/GNUStep text codec (one feature: the two
//! dialects share a parser, and OpenStep-versus-GNUStep is a runtime
//! outcome).
//!
//! Decoding a format whose feature is compiled out fails with
//! [`Error::InvalidPlist`] from its rung of the detection ladder; encoding
//! one fails with [`Error::FeatureDisabled`].
pub use crateDate;
pub use crate;
pub use crate;
pub use crateMAX_PARSE_DEPTH;
pub use crate;
pub use crateFormat;
pub use crateEncoder;
pub use crate;
pub use crateUid;
pub use cratefrom_value;
pub use crateto_value;
pub use crate;