pub struct DecodeRequest {
pub fmt: PixelFormat,
pub region: Option<Rect>,
pub scale: Downscale,
}Expand description
Owned-output JPEG decode request.
This consolidates the full-image, region, and downscale axes for callers that want a freshly allocated tightly packed output buffer.
Fields§
§fmt: PixelFormatRequested output pixel format.
region: Option<Rect>Optional source-image region to decode.
scale: DownscaleRequested decoder downscale.
Implementations§
Source§impl DecodeRequest
impl DecodeRequest
Sourcepub const fn full(fmt: PixelFormat) -> Self
pub const fn full(fmt: PixelFormat) -> Self
Full-image decode at native scale.
Sourcepub const fn scaled(fmt: PixelFormat, scale: Downscale) -> Self
pub const fn scaled(fmt: PixelFormat, scale: Downscale) -> Self
Full-image decode with downscale.
Sourcepub const fn region(fmt: PixelFormat, region: Rect) -> Self
pub const fn region(fmt: PixelFormat, region: Rect) -> Self
Region decode at native scale.
Sourcepub const fn region_scaled(
fmt: PixelFormat,
region: Rect,
scale: Downscale,
) -> Self
pub const fn region_scaled( fmt: PixelFormat, region: Rect, scale: Downscale, ) -> Self
Region decode with downscale.
Trait Implementations§
Source§impl Clone for DecodeRequest
impl Clone for DecodeRequest
Source§fn clone(&self) -> DecodeRequest
fn clone(&self) -> DecodeRequest
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 DecodeRequest
Source§impl Debug for DecodeRequest
impl Debug for DecodeRequest
impl Eq for DecodeRequest
Source§impl PartialEq for DecodeRequest
impl PartialEq for DecodeRequest
impl StructuralPartialEq for DecodeRequest
Auto Trait Implementations§
impl Freeze for DecodeRequest
impl RefUnwindSafe for DecodeRequest
impl Send for DecodeRequest
impl Sync for DecodeRequest
impl Unpin for DecodeRequest
impl UnsafeUnpin for DecodeRequest
impl UnwindSafe for DecodeRequest
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