#[non_exhaustive]pub enum ChromaUpsample {
Box,
}Expand description
Chroma upsampling filter for a fused native-4:2:0 Rgb decode (see
ImageDecoder::set_output_format).
Box — 2×2 nearest-neighbour replication — is the only
filter implemented today; the type exists so that a future
fancy/triangle-filtered mode (libjpeg-turbo’s default, and a materially
more expensive one — see BENCHMARKS.md) can be added as a new variant
without a breaking API change to
ImageDecoder::set_chroma_upsample. #[non_exhaustive] for the same
reason: adding a variant later must not be a semver break for callers who
match on this type.
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.
Box
2×2 nearest-neighbour (box) chroma replication.
Trait Implementations§
Source§impl Clone for ChromaUpsample
impl Clone for ChromaUpsample
Source§fn clone(&self) -> ChromaUpsample
fn clone(&self) -> ChromaUpsample
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 moreimpl Copy for ChromaUpsample
Source§impl Debug for ChromaUpsample
impl Debug for ChromaUpsample
Source§impl Default for ChromaUpsample
impl Default for ChromaUpsample
Source§fn default() -> ChromaUpsample
fn default() -> ChromaUpsample
Returns the “default value” for a type. Read more
impl Eq for ChromaUpsample
Source§impl PartialEq for ChromaUpsample
impl PartialEq for ChromaUpsample
impl StructuralPartialEq for ChromaUpsample
Auto Trait Implementations§
impl Freeze for ChromaUpsample
impl RefUnwindSafe for ChromaUpsample
impl Send for ChromaUpsample
impl Sync for ChromaUpsample
impl Unpin for ChromaUpsample
impl UnsafeUnpin for ChromaUpsample
impl UnwindSafe for ChromaUpsample
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