#[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
impl StructuralPartialEq for ImageFormatHint
Auto Trait Implementations§
impl Freeze for ImageFormatHint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)