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
//! The OpenStep/GNUStep text codec: one parser/generator pair serving both
//! dialects.
//!
//! The parser always starts in OpenStep mode and irreversibly upgrades to
//! GNUStep on the first `<*` or `<[` literal; the generator is constructed
//! for one dialect and differs only in its quoting table and typed-scalar
//! emission. The dialect split is runtime — the single `openstep` cargo
//! feature covers both.
use Write;
use crateResult;
use crateFormat;
use crateValue;
/// Parses a text plist, reporting [`Format::OpenStep`] or
/// [`Format::GnuStep`].
///
/// # Errors
///
/// Returns [`Error::Parse`](crate::Error::Parse) with format `"text"` for
/// malformed input and [`Error::MaxDepthExceeded`](crate::Error::MaxDepthExceeded)
/// past the nesting cap; text parse failures never trigger the decode
/// ladder's XML-to-text retry.
pub
/// Writes `value` as a text plist in the given dialect (any non-GNUStep
/// `format` emits OpenStep).
///
/// # Errors
///
/// Returns [`Error::Io`](crate::Error::Io) when the writer fails; every
/// value serializes.
pub