#[non_exhaustive]pub enum ErrorKind {
Show 21 variants
UnknownFormat,
TooMuchData,
SizeMismatch,
FileDecoding(FileDecodingError),
FileEncoding(FileEncodingError),
NotAPicture,
UnsupportedPicture,
UnsupportedTag,
FakeTag,
TextDecode(&'static str),
BadTimestamp(&'static str),
Id3v2(Id3v2Error),
BadAtom(&'static str),
AtomMismatch,
OggPage(PageError),
StringFromUtf8(FromUtf8Error),
StrFromUtf8(Utf8Error),
Io(Error),
Fmt(Error),
Alloc(TryReserveError),
Infallible(Infallible),
}
Expand description
The types of errors that can occur
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownFormat
Unable to guess the format
TooMuchData
Attempting to read/write an abnormally large amount of data
SizeMismatch
Expected the data to be a different size than provided
This occurs when the size of an item is written as one value, but that size is either too big or small to be valid within the bounds of that item.
FileDecoding(FileDecodingError)
Errors that occur while decoding a file
FileEncoding(FileEncodingError)
Errors that occur while encoding a file
NotAPicture
Provided an invalid picture
UnsupportedPicture
Attempted to write a picture that the format does not support
UnsupportedTag
Arises when writing a tag to a file type that doesn’t support it
FakeTag
Arises when a tag is expected (Ex. found an “ID3 “ chunk in a WAV file), but isn’t found
TextDecode(&'static str)
Errors that arise while decoding text
BadTimestamp(&'static str)
Arises when decoding OR encoding a problematic Timestamp
Id3v2(Id3v2Error)
Errors that arise while reading/writing ID3v2 tags
BadAtom(&'static str)
Arises when an atom contains invalid data
AtomMismatch
Arises when attempting to use Atom::merge
with mismatching identifiers
OggPage(PageError)
Errors that arise while parsing OGG pages
StringFromUtf8(FromUtf8Error)
Unable to convert bytes to a String
StrFromUtf8(Utf8Error)
Unable to convert bytes to a str
Io(Error)
Represents all cases of std::io::Error
.
Fmt(Error)
Represents all cases of std::fmt::Error
.
Alloc(TryReserveError)
Failure to allocate enough memory
Infallible(Infallible)
This should never be encountered