lofty/ape/
mod.rs

1//! APE specific items
2//!
3//! ## File notes
4//!
5//! It is possible for an `APE` file to contain an `ID3v2` tag. For the sake of data preservation,
6//! this tag will be read, but **cannot** be written. The only tags allowed by spec are `APEv1/2` and
7//! `ID3v1`.
8pub(crate) mod constants;
9pub(crate) mod header;
10mod properties;
11mod read;
12pub(crate) mod tag;
13
14use crate::id3::v1::tag::Id3v1Tag;
15use crate::id3::v2::tag::Id3v2Tag;
16
17use lofty_attr::LoftyFile;
18
19// Exports
20
21pub use crate::picture::APE_PICTURE_TYPES;
22pub use properties::ApeProperties;
23pub use tag::ApeTag;
24pub use tag::item::ApeItem;
25
26/// An APE file
27#[derive(LoftyFile)]
28#[lofty(read_fn = "read::read_from")]
29#[lofty(internal_write_module_do_not_use_anywhere_else)]
30pub struct ApeFile {
31	/// An ID3v1 tag
32	#[lofty(tag_type = "Id3v1")]
33	pub(crate) id3v1_tag: Option<Id3v1Tag>,
34	/// An ID3v2 tag (Not officially supported)
35	#[lofty(tag_type = "Id3v2")]
36	pub(crate) id3v2_tag: Option<Id3v2Tag>,
37	/// An APEv1/v2 tag
38	#[lofty(tag_type = "Ape")]
39	pub(crate) ape_tag: Option<ApeTag>,
40	/// The file's audio properties
41	pub(crate) properties: ApeProperties,
42}