pub enum ContainerFormat {
Png,
Webp,
Avif,
}Expand description
Identifies one of the supported image container formats for the
runtime-dispatched rgb_to_container entry point.
All three variants are always present in the enum so callers can
parse user-supplied format names regardless of which cargo features
were enabled at compile time. Encoding into a format whose feature is
not enabled returns ContainerError::Unsupported.
Variants§
Implementations§
Source§impl ContainerFormat
impl ContainerFormat
Sourcepub const fn is_enabled(self) -> bool
pub const fn is_enabled(self) -> bool
Whether the encoder for this format was compiled in at build time.
Trait Implementations§
Source§impl Clone for ContainerFormat
impl Clone for ContainerFormat
Source§fn clone(&self) -> ContainerFormat
fn clone(&self) -> ContainerFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContainerFormat
impl Debug for ContainerFormat
Source§impl Display for ContainerFormat
impl Display for ContainerFormat
Source§impl FromStr for ContainerFormat
impl FromStr for ContainerFormat
Source§impl Hash for ContainerFormat
impl Hash for ContainerFormat
Source§impl PartialEq for ContainerFormat
impl PartialEq for ContainerFormat
Source§fn eq(&self, other: &ContainerFormat) -> bool
fn eq(&self, other: &ContainerFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ContainerFormat
impl Eq for ContainerFormat
impl StructuralPartialEq for ContainerFormat
Auto Trait Implementations§
impl Freeze for ContainerFormat
impl RefUnwindSafe for ContainerFormat
impl Send for ContainerFormat
impl Sync for ContainerFormat
impl Unpin for ContainerFormat
impl UnsafeUnpin for ContainerFormat
impl UnwindSafe for ContainerFormat
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more