Enum lofty::LoftyError[][src]

pub enum LoftyError {
Show 28 variants BadExtension(String), UnknownFormat, EmptyFile, TooMuchData, BadPictureFormat(String), NotAPicture, UnsupportedPicture, UnsupportedTag, FakeTag, TextDecode(&'static str), Id3v2(&'static str), BadId3v2Version(u8u8), BadFrameID, BadFrameLength, BadSyncText, BadAtom(&'static str), Wav(&'static str), Aiff(&'static str), Flac(&'static str), Opus(&'static str), Vorbis(&'static str), Ogg(&'static str), Mp3(&'static str), Mp4(&'static str), Ape(&'static str), OggPage(PageError), FromUtf8(FromUtf8Error), Io(Error),
}
Expand description

Errors that could occur within Lofty

Variants

BadExtension(String)

Tuple Fields

0: String

Unsupported file extension

UnknownFormat

Unable to guess the format

EmptyFile

Provided an empty file

TooMuchData

Attempting to read/write an abnormally large amount of data

BadPictureFormat(String)

Tuple Fields

0: String

Arises when an invalid picture format is parsed. Only applicable to Id3v2Version::V2

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)

Tuple Fields

0: &'static str

Errors that arise while decoding text

Id3v2(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing ID3v2 tags

BadId3v2Version(u8u8)

Tuple Fields

0: u8
1: u8

Arises when an invalid ID3v2 version is found

BadFrameID

Arises when a frame ID contains invalid characters (must be within 'A'..'Z' or '0'..'9')

BadFrameLength

Arises when a frame doesn’t have enough data

BadSyncText

Arises when invalid data is encountered while reading an ID3v2 synchronized text frame

BadAtom(&'static str)

Tuple Fields

0: &'static str

Arises when an atom contains invalid data

Wav(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to WAV files

Aiff(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to AIFF files

Flac(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to FLAC files

Opus(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to OPUS files

Vorbis(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to OGG Vorbis files

Ogg(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to OGG files

Mp3(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to MP3 files

Mp4(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to MP4 files

Ape(&'static str)

Tuple Fields

0: &'static str

Errors that arise while reading/writing to APE files

OggPage(PageError)

Tuple Fields

Errors that arise while parsing OGG pages

FromUtf8(FromUtf8Error)

Tuple Fields

Unable to convert bytes to a String

Io(Error)

Tuple Fields

0: Error

Represents all cases of std::io::Error.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.