pub struct DecodeRequest {
pub roi: Option<Rect>,
pub scale: Downscale,
}Expand description
Source-region and reduced-resolution shape requested during decode.
Fields§
§roi: Option<Rect>Optional source-image region. None requests the full image.
scale: DownscaleReduced-resolution decode scale.
Implementations§
Source§impl DecodeRequest
impl DecodeRequest
Sourcepub const FULL: DecodeRequest
pub const FULL: DecodeRequest
Full-image, full-resolution decode request.
Sourcepub const fn full() -> DecodeRequest
pub const fn full() -> DecodeRequest
Construct a full-image, full-resolution decode request.
Sourcepub const fn region(roi: Rect) -> DecodeRequest
pub const fn region(roi: Rect) -> DecodeRequest
Construct a full-resolution region decode request.
Sourcepub const fn scaled(scale: Downscale) -> DecodeRequest
pub const fn scaled(scale: Downscale) -> DecodeRequest
Construct a full-image scaled decode request.
Sourcepub const fn region_scaled(roi: Rect, scale: Downscale) -> DecodeRequest
pub const fn region_scaled(roi: Rect, scale: Downscale) -> DecodeRequest
Construct a region scaled decode request.
Sourcepub const fn is_full_resolution_full_image(self) -> bool
pub const fn is_full_resolution_full_image(self) -> bool
Return whether this request covers the full image at full resolution.
Sourcepub fn decoded_rect(self, dimensions: (u32, u32)) -> Rect
pub fn decoded_rect(self, dimensions: (u32, u32)) -> Rect
Return the output rectangle covered by this request for image dimensions.
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
Source§impl Default for DecodeRequest
impl Default for DecodeRequest
Source§fn default() -> DecodeRequest
fn default() -> DecodeRequest
Returns the “default value” for a type. Read more
impl Eq for DecodeRequest
Source§impl Hash for DecodeRequest
impl Hash for DecodeRequest
Source§impl PartialEq for DecodeRequest
impl PartialEq for DecodeRequest
Source§fn eq(&self, other: &DecodeRequest) -> bool
fn eq(&self, other: &DecodeRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.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