Enum lewton::header::HeaderReadError [] [src]

pub enum HeaderReadError {
    EndOfPacket,
    NotVorbisHeader,
    UnsupportedVorbisVersion,
    HeaderBadFormat,
    HeaderBadType(u8),
    HeaderIsAudio,
    Utf8DecodeError,
    BufferNotAddressable,
}

Errors that can occur during Header decoding

Variants

If the passed data don't start with the "vorbis" capture pattern, this error is returned.

If the header violates the vorbis spec

The given packet indeed seems to be a vorbis header, but it looks like it is a different header type than the function it was passed to.

It is not guaranteed that the type is a valid header type.

The given packet does not seem to be a header as per vorbis spec, instead it seems to be an audio packet.

If the needed memory isn't addressable by us

This error is returned if a calculation yielded a higher value for an internal buffer size that doesn't fit into the platform's address range. Note that if we "simply" encounter an allocation failure (OOM, etc), we do what libstd does in these cases: crash.

This error is not automatically an error of the passed data, but rather is due to insufficient decoder hardware.

Trait Implementations

impl Debug for HeaderReadError
[src]

Formats the value using the given formatter.

impl PartialEq for HeaderReadError
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<()> for HeaderReadError
[src]

Performs the conversion.

impl From<HuffmanError> for HeaderReadError
[src]

Performs the conversion.

impl From<Error> for HeaderReadError
[src]

Performs the conversion.

impl From<FromUtf8Error> for HeaderReadError
[src]

Performs the conversion.

impl Error for HeaderReadError
[src]

A short description of the error. Read more

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

impl Display for HeaderReadError
[src]

Formats the value using the given formatter. Read more