Struct image::error::EncodingError [−][src]
pub struct EncodingError { /* fields omitted */ }
An error was encountered while encoding an image.
This is used as an opaque representation for the ImageError::Encoding
variant. See its
documentation for more information.
Implementations
impl EncodingError
[src]
impl EncodingError
[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 an EncodingError
that stems from an arbitrary error of an underlying encoder.
pub fn from_format_hint(format: ImageFormatHint) -> Self
[src]
Create an EncodingError
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]
Return the image format associated with this error.