#[non_exhaustive]pub enum Error {
Show 65 variants
Io(Error),
Utf8(Box<FromUtf8Error>),
MissingFlacTag,
MissingStreaminfo,
MultipleStreaminfo,
MultipleSeekTable,
MultipleVorbisComment,
InvalidSeekTableSize,
InvalidSeekTablePoint,
Cuesheet(CuesheetError),
InvalidPictureType,
MultiplePngIcon,
MultipleGeneralIcon,
ReservedMetadataBlock,
InvalidMetadataBlock,
InvalidMetadataBlockSize,
InsufficientApplicationBlock,
ExcessiveVorbisEntries,
ExcessiveStringLength,
ExcessivePictureSize,
ShortBlock,
ExcessiveBlockSize,
InvalidSyncCode,
InvalidBlockSize,
BlockSizeMismatch,
InvalidSampleRate,
NonSubsetSampleRate,
NonSubsetBitsPerSample,
SampleRateMismatch,
ExcessiveChannels,
InvalidChannels,
ChannelsMismatch,
InvalidBitsPerSample,
ExcessiveBps,
BitsPerSampleMismatch,
InvalidFrameNumber,
InvalidSeek,
ExcessiveFrameNumber,
Crc8Mismatch,
Crc16Mismatch,
InvalidSubframeHeader,
InvalidSubframeHeaderType,
ExcessiveWastedBits,
MissingResiduals,
InvalidCodingMethod,
InvalidPartitionOrder,
InvalidFixedOrder,
InvalidLpcOrder,
InvalidQlpPrecision,
NegativeLpcShift,
NoBestLpcOrder,
InsufficientLpcSamples,
ZeroLpCoefficients,
LpNegativeShiftError,
AccumulatorOverflow,
TooManySamples,
ExcessiveTotalSamples,
NoSamples,
SampleCountMismatch,
ResidualOverflow,
SamplesNotDivisibleByChannels,
InvalidTotalBytes,
InvalidTotalSamples,
ChannelCountMismatch,
ChannelLengthMismatch,
}
Expand description
A unified FLAC error
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
A general I/O error from the underlying stream
Utf8(Box<FromUtf8Error>)
A UTF-8 formatting error
MissingFlacTag
A FLAC file missing its initial “fLaC” file tag
MissingStreaminfo
A FLAC file missing its initial STREAMINFO block
MultipleStreaminfo
A FLAC file containing multiple STREAMINFO blocks
MultipleSeekTable
A FLAC file containing multiple SEEKTABLE blocks
MultipleVorbisComment
A FLAC file containing multiple VORBIS_COMMENT blocks
InvalidSeekTableSize
A SEEKTABLE block whose size isn’t evenly divisible by a whole of number of seek points.
InvalidSeekTablePoint
A SEEKTABLE point whose offset does not increment properly
Cuesheet(CuesheetError)
A CUESHEET-specific error
InvalidPictureType
An undefined PICTURE type
MultiplePngIcon
Multiple 32x32 PNG icons defined
MultipleGeneralIcon
Multiple general file icons defined
ReservedMetadataBlock
A reserved metadata block encountered
InvalidMetadataBlock
An invalid metadata block encountered
InvalidMetadataBlockSize
A metadata block’s contents are smaller than the size indicated in the metadata block header.
InsufficientApplicationBlock
An APPLICATION metadata block which is not large enough to hold any contents beyond its ID.
ExcessiveVorbisEntries
A VorbisComment
struct with more entries that can fit in a u32
ExcessiveStringLength
A VorbisComment
or Picture
struct with strings longer than a u32
ExcessivePictureSize
A Picture
struct whose data is larger than a u32
ShortBlock
A block size less than 15 that’s not the last block
ExcessiveBlockSize
A metadata block larger than its 24-bit size field can hold
InvalidSyncCode
Invalid frame sync code
InvalidBlockSize
Invalid frame block size
BlockSizeMismatch
Block size in frame is larger than maximum block size in STREAMINFO
InvalidSampleRate
Invalid frame sample rate
NonSubsetSampleRate
Non-subset frame sample rate
NonSubsetBitsPerSample
Non-subset frame bits-per-sample
SampleRateMismatch
Mismatch between frame sample rate and STREAMINFO sample rate
ExcessiveChannels
Excessive channel count
InvalidChannels
Invalid frame channel assignment
ChannelsMismatch
Channel count in frame differs from channel count in STREAMINFO
InvalidBitsPerSample
Invalid frame bits-per-sample
ExcessiveBps
Excessive number of bits-per-sample
BitsPerSampleMismatch
Bits-per-sample in frame differs from bits-per-sample in STREAMINFO
InvalidFrameNumber
Invalid frame number
InvalidSeek
Seeking beyond end of file
ExcessiveFrameNumber
Excessive frame number
Crc8Mismatch
CRC-8 mismatch in frame header
Crc16Mismatch
CRC-16 mismatch in frame footer
InvalidSubframeHeader
Invalid subframe header
InvalidSubframeHeaderType
Invalid subframe header type
ExcessiveWastedBits
Excessive number of wasted bits-per-sample
MissingResiduals
Insufficient number of residuals in residuals block
InvalidCodingMethod
Invalid residual coding method
InvalidPartitionOrder
Invalid residual partition order
InvalidFixedOrder
Invalid FIXED subframe predictor order
InvalidLpcOrder
Invalid LPC subframe predictor order
InvalidQlpPrecision
Invalid coefficient precision bits
NegativeLpcShift
Negative shift value in LPC subframe
NoBestLpcOrder
Unable to determine best LPC order
InsufficientLpcSamples
Insufficient samples for LPC subframe
ZeroLpCoefficients
LP coefficients are all 0
LpNegativeShiftError
Excessive negative shift in LP quantization
AccumulatorOverflow
Accumulator overflow in LPC subframe
TooManySamples
Too many samples encountered in stream
ExcessiveTotalSamples
Too many samples requested by encoder
NoSamples
No samples written by encoder
SampleCountMismatch
Number of samples written to stream differs from expected
ResidualOverflow
Residual overflow
SamplesNotDivisibleByChannels
Number of samples not evenly divisible by number of channels
InvalidTotalBytes
Invalid total byte count
InvalidTotalSamples
Invalid total samples count
ChannelCountMismatch
Number of channels sent to encoder is incorrect
ChannelLengthMismatch
Channels sent to encoder are not all the same length