Enum image::error::ImageFormatHint
source · #[non_exhaustive]pub enum ImageFormatHint {
Exact(ImageFormat),
Name(String),
PathExtension(PathBuf),
Unknown,
}
Expand description
A best effort representation for image formats.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Exact(ImageFormat)
The format is known exactly.
Name(String)
The format can be identified by a name.
PathExtension(PathBuf)
A common path extension for the format is known.
Unknown
The format is not known or could not be determined.
Trait Implementations§
source§impl Clone for ImageFormatHint
impl Clone for ImageFormatHint
source§fn clone(&self) -> ImageFormatHint
fn clone(&self) -> ImageFormatHint
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ImageFormatHint
impl Debug for ImageFormatHint
source§impl Display for ImageFormatHint
impl Display for ImageFormatHint
source§impl From<&Path> for ImageFormatHint
impl From<&Path> for ImageFormatHint
source§impl From<ImageFormat> for ImageFormatHint
impl From<ImageFormat> for ImageFormatHint
source§fn from(format: ImageFormat) -> Self
fn from(format: ImageFormat) -> Self
Converts to this type from the input type.
source§impl From<ImageFormatHint> for UnsupportedError
impl From<ImageFormatHint> for UnsupportedError
source§fn from(hint: ImageFormatHint) -> Self
fn from(hint: ImageFormatHint) -> Self
Converts to this type from the input type.
source§impl Hash for ImageFormatHint
impl Hash for ImageFormatHint
source§impl PartialEq for ImageFormatHint
impl PartialEq for ImageFormatHint
source§fn eq(&self, other: &ImageFormatHint) -> bool
fn eq(&self, other: &ImageFormatHint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ImageFormatHint
Auto Trait Implementations§
impl RefUnwindSafe for ImageFormatHint
impl Send for ImageFormatHint
impl Sync for ImageFormatHint
impl Unpin for ImageFormatHint
impl UnwindSafe for ImageFormatHint
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more