#[non_exhaustive]pub enum Id3v2ErrorKind {
Show 19 variants
BadId3v2Version(u8, u8),
V2Compression,
BadExtendedHeaderSize,
BadFrameId(Vec<u8>),
UnsupportedFrameId(ItemKey),
BadFrameLength,
EmptyFrame(FrameId<'static>),
MissingDataLengthIndicator,
InvalidUnsynchronisation,
V2InvalidTextEncoding,
BadPictureFormat(String),
BadSyncText,
MissingUfidOwner,
BadRva2ChannelType,
BadTimestampFormat,
Decompression(DecompressError),
InvalidEncryptionMethodSymbol(u8),
BadFrame(String, &'static str),
InvalidLanguage([u8; 3]),
}
Expand description
The types of errors that can occur while interacting with ID3v2 tags
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadId3v2Version(u8, u8)
Arises when an invalid ID3v2 version is found
V2Compression
Arises when a compressed ID3v2.2 tag is encountered
At the time the ID3v2.2 specification was written, a compression scheme wasn’t decided. As such, it is recommended to ignore the tag entirely.
BadExtendedHeaderSize
Arises when an extended header has an invalid size (must be >= 6 bytes and less than the total tag size)
BadFrameId(Vec<u8>)
Arises when a frame ID contains invalid characters (must be within 'A'..'Z'
or '0'..'9'
)
or if the ID is too short/long.
UnsupportedFrameId(ItemKey)
Arises when no frame ID is available in the ID3v2 specification for an item key and the associated value type.
BadFrameLength
Arises when a frame doesn’t have enough data
EmptyFrame(FrameId<'static>)
Arises when a frame with no content is parsed with ParsingMode::Strict
MissingDataLengthIndicator
Arises when reading/writing a compressed or encrypted frame with no data length indicator
InvalidUnsynchronisation
Arises when a frame or tag has its unsynchronisation flag set, but the content is not actually synchsafe
See FrameFlags::unsynchronisation
for an explanation.
V2InvalidTextEncoding
Arises when a text encoding other than Latin-1 or UTF-16 appear in an ID3v2.2 tag
BadPictureFormat(String)
Arises when an invalid picture format is parsed. Only applicable to ID3v2Version::V2
BadSyncText
Arises when invalid data is encountered while reading an ID3v2 synchronized text frame
MissingUfidOwner
Arises when decoding a UniqueFileIdentifierFrame
with no owner
BadRva2ChannelType
Arises when decoding a RelativeVolumeAdjustmentFrame
with an invalid channel type
BadTimestampFormat
Arises when decoding a TimestampFormat
with an invalid type
Decompression(DecompressError)
id3v2_compression_support
only.Arises when a compressed frame is unable to be decompressed
InvalidEncryptionMethodSymbol(u8)
Arises when attempting to write an encrypted frame with an invalid encryption method symbol (must be <= 0x80)
BadFrame(String, &'static str)
Arises when attempting to write an invalid Frame (Bad FrameId
/FrameValue
pairing)
InvalidLanguage([u8; 3])
Arises when attempting to write a CommentFrame
or UnsynchronizedTextFrame
with an invalid language