Struct image::error::DecodingError [−][src]
pub struct DecodingError { /* fields omitted */ }
An error was encountered while decoding an image.
This is used as an opaque representation for the ImageError::Decoding
variant. See its
documentation for more information.
Implementations
impl DecodingError
[src]
impl DecodingError
[src]pub fn new(
format: ImageFormatHint,
err: impl Into<Box<dyn Error + Send + Sync>>
) -> Self
[src]
format: ImageFormatHint,
err: impl Into<Box<dyn Error + Send + Sync>>
) -> Self
Create a DecodingError
that stems from an arbitrary error of an underlying decoder.
pub fn from_format_hint(format: ImageFormatHint) -> Self
[src]
Create a DecodingError
for an image format.
The error will not contain any further information but is very easy to create.
pub fn format_hint(&self) -> ImageFormatHint
[src]
Returns the image format associated with this error.