Enum immeta::Error [] [src]

pub enum Error {
    InvalidFormat(Cow<'static, str>),
    UnexpectedEndOfFile(Option<Cow<'static, str>>),
    Io(Error),
}

Library-specific error type which is returned by metadata loading operations.

Variants

InvalidFormat(Cow<'static, str>)

Returned when metadata can't be recovered because image format is invalid.

This error can be caused by broken file or when trying to load an image with an incorrect metadata decoder, e.g. trying to load PNG metadata from JPEG.

UnexpectedEndOfFile(Option<Cow<'static, str>>)

Returned when metadata can't be recovered because of the sudden end of the image file.

Usually this error is caused by broken files, but it may also be cause by applying loose formats (like JPEG) to a different image type.

Io(Error)

Returned when an I/O error occurs when reading an input stream.

Trait Implementations

impl Debug for Error
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Error
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Error for Error
[src]

fn description(&self) -> &str

A short description of the error. Read more

fn cause(&self) -> Option<&Error>

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

impl From<Error> for Error
[src]

fn from(e: Error) -> Error

Performs the conversion.

impl From<Error> for Error
[src]

fn from(e: Error) -> Error

Performs the conversion.