Struct EncodingError

pub struct EncodingError { /* private fields */ }

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

fn new(format: ImageFormatHint, err: impl Into<Box<dyn Error + Send + Sync>>) -> Self

Create an EncodingError that stems from an arbitrary error of an underlying encoder.

fn from_format_hint(format: ImageFormatHint) -> Self

Create an EncodingError for an image format.

The error will not contain any further information but is very easy to create.

fn format_hint(&self) -> ImageFormatHint

Return the image format associated with this error.

Trait Implementations

impl Debug for EncodingError

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

impl Display for EncodingError

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

impl Error for EncodingError

fn source(&self) -> Option<&dyn Error + 'static>

Auto Trait Implementations

impl !RefUnwindSafe for EncodingError

impl !UnwindSafe for EncodingError

impl Freeze for EncodingError

impl Send for EncodingError

impl Sync for EncodingError

impl Unpin for EncodingError

impl UnsafeUnpin for EncodingError

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for EncodingError where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for EncodingError where ST: ?Sized, DT: ?Sized,

impl<T> Any for EncodingError where T: 'static + ?Sized,

impl<T> Borrow<T> for EncodingError where T: ?Sized,

impl<T> BorrowMut<T> for EncodingError where T: ?Sized,

impl<T> From<T> for EncodingError

impl<T> IntoEither for EncodingError

impl<T> Pointable for EncodingError

impl<T> Read<Exclusive, BecauseExclusive> for EncodingError where T: ?Sized,

impl<T> ToString for EncodingError where T: Display + ?Sized,

impl<T, U> Into<U> for EncodingError where U: From<T>,

impl<T, U> TryFrom<U> for EncodingError where U: Into<T>,

impl<T, U> TryInto<U> for EncodingError where U: TryFrom<T>,