pub struct EncodingOps {
pub format: Option<EncodeFormat>,
pub quality: Option<u8>,
pub background: Option<(u8, u8, u8)>,
}Expand description
Encoding hints — applied after the geometric resize. Filter
pipeline spec encodes these as |format-X|quality-N|bgcolor-XYZ
chained after the resize op. All optional; defaults match the
source format (JPEG → JPEG, anything else → PNG).
Format::Auto is reserved for future content-negotiation via
the Accept header — today it behaves like Format::Webp.
Fields§
§format: Option<EncodeFormat>§quality: Option<u8>1..=100 — applied to JPEG / WebP / AVIF encoders. PNG ignores.
background: Option<(u8, u8, u8)>RGB background painted under transparent pixels before
encoding to a non-alpha format. Hex triplet — e.g.
bgcolor-fff or bgcolor-ffffff (3 or 6 hex chars).
Trait Implementations§
Source§impl Clone for EncodingOps
impl Clone for EncodingOps
impl Copy for EncodingOps
Source§impl Debug for EncodingOps
impl Debug for EncodingOps
Source§impl Default for EncodingOps
impl Default for EncodingOps
Source§impl PartialEq for EncodingOps
impl PartialEq for EncodingOps
impl StructuralPartialEq for EncodingOps
Auto Trait Implementations§
impl Freeze for EncodingOps
impl RefUnwindSafe for EncodingOps
impl Send for EncodingOps
impl Sync for EncodingOps
impl Unpin for EncodingOps
impl UnsafeUnpin for EncodingOps
impl UnwindSafe for EncodingOps
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreCreates a shared type from an unshared type.