1use std::io;
2
3#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum Error {
7 #[error("I/O error: {0}")]
9 Io(#[from] io::Error),
10 #[error("not a DSF file: bad `{0}` chunk signature")]
12 BadSignature(&'static str),
13 #[error("malformed DSF: {0}")]
15 Malformed(&'static str),
16 #[error("ID3 error: {0}")]
18 Id3(#[from] id3::Error),
19 #[error("invalid text frame id {0:?} (expected e.g. \"TIT2\"; TXXX is not supported)")]
21 InvalidFrameId(String),
22}
23
24pub type Result<T> = std::result::Result<T, Error>;