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
//! low-level library for the XSPF format
//!
//! based off of <https://xspf.org/spec>
//!
//! this library follows the pardigm of
//! "be lax with what you accept but strict with what you output",
//! and as such will accept many invalid documents as valid.
//!
//! # crate feature: parse
//! there are 3 ways of deserializing xspf documents with this library:
//! * [`Playlist::read_from`]
//! * [`Playlist::read_file`]
//! * the [`std::str::FromStr`] implemention on [`Playlist`]
//!
//! all 3 of these methods have identical logic.
//!
//! # crate feature: print
//! for serialzing xspf documents, there are a few more options.
//!
//! methods that output xml with no line breaks or indentation:
//! * `Playlist.write_to`
//! * `Playlist.write_file`
//! * `Playlist.to_string`
//!
//! corrosponding methods that output xml with line breaks, and take an
//! addtional argument (what string to indent with)
//! * `Playlist.write_to_pretty`
//! * `Playlist.to_string_pretty`
//!
//! # crate feature: setters
//! this feature (enabled by default) defines a set of convenience methods
//! for setting various fields.
//!
//! there are two types of setters:
//! * `set_*` methods, which set a field to Some.
//! * `add_*` methods, which append to a Vec.
//!
//! all setter methods:
//! * return their reciever (so they can be chained)
//! * mutate their reciever (so call `clone()` beforehand if this is undesirable)
//!
//! setters for String fields will automatically call `to_string` if needed.
//!
//! # crate feature: proptest
//! this feature makes [`Playlist`] impl [`proptest::arbitrary::Arbitrary`].
//!
//! note that for all `xspf` types generated by proptest,
//! their `extension` field will be empty.
pub use crate;