[][src]Enum riffu::error::RiffError

pub enum RiffError {
    Io(Error),
    PayloadLenMismatch(PayloadLenMismatch),
    ChunkTooSmall(ChunkTooSmall),
    ChunkTooSmallForChunkType(ChunkTooSmallForChunkType),
    Utf8Error(Utf8Error),
    InvalidRiffHeader,
    NoneError(NoneError),
    TryFromSliceError(TryFromSliceError),
    MismatchChunkAdded,
}

The type of errors that this library may emit. Note that most of this errors are currently unused. There are many, many ways reading into a RIFF file may fail.

Variants

Io(Error)

IO errors that will be emitted by standard IO.

PayloadLenMismatch(PayloadLenMismatch)

Indicates that the provided payload length does not match the raw data's length. Since the data may be a list of Chunks, it is more likely that this error is caused when payload's length > raw data's size.

ChunkTooSmall(ChunkTooSmall)

Indicates that the requested data is too small to be a valid chunk. Note that this returns the entire data and the starting position where this "chunk" is supposed to reside.

ChunkTooSmallForChunkType(ChunkTooSmallForChunkType)

Indicates that the Chunk is too small to contain a FourCC.

Utf8Error(Utf8Error)
InvalidRiffHeader

Indicates that this is a malformed RIFF file. RIFF file requires that the first 4 bytes of the file contains the ASCII letters "RIFF".

NoneError(NoneError)

Indicates a None error caused by unwrapping a None.

TryFromSliceError(TryFromSliceError)

Indicates a failure when trying to convert from &str to a slice.

MismatchChunkAdded

Indicates an attempt at appending a raw chunk into a chunk with

Trait Implementations

impl Debug for RiffError[src]

impl Display for RiffError[src]

impl Error for RiffError[src]

impl From<Error> for RiffError[src]

Converts std::io::Error.

fn from(v: Error) -> Self[src]

Performs the conversion.

impl From<NoneError> for RiffError[src]

Converts std::option::NoneError.

fn from(v: NoneError) -> Self[src]

Performs the conversion.

impl From<TryFromSliceError> for RiffError[src]

Converts std::option::NoneError.

fn from(v: TryFromSliceError) -> Self[src]

Performs the conversion.

impl From<Utf8Error> for RiffError[src]

Converts std::str::Utf8Error.

fn from(v: Utf8Error) -> Self[src]

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.