Struct DecodingError

struct DecodingError { ... }

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

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

Create a DecodingError that stems from an arbitrary error of an underlying decoder.

fn from_format_hint(format: ImageFormatHint) -> Self

Create a DecodingError for an image format.

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

fn format_hint(self: &Self) -> ImageFormatHint

Returns the image format associated with this error.

impl Debug for DecodingError

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

impl Display for DecodingError

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

impl Error for DecodingError

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

impl Freeze for DecodingError

impl RefUnwindSafe for DecodingError

impl Send for DecodingError

impl Sync for DecodingError

impl Unpin for DecodingError

impl UnwindSafe for DecodingError

impl<T> Any for DecodingError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for DecodingError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for DecodingError

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for DecodingError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for DecodingError

unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> ToString for DecodingError

fn to_string(self: &Self) -> String

impl<T, U> Into for DecodingError

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for DecodingError

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for DecodingError

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>