#[non_exhaustive]pub struct DecodeOptions {
pub resolution_reduction: u8,
}Expand description
Options for decode_with. The default decodes at full resolution —
decode is exactly that.
Start from DecodeOptions::default and set what differs, with the
with_* methods or the fields directly. The struct is #[non_exhaustive],
so a new option is not a breaking change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resolution_reduction: u8How many of the finest resolution levels to discard. Each level halves
the output in both axes (rounding up), so 1 decodes a half-size image,
2 a quarter-size, and so on — the wavelet pyramid’s own lower
resolutions, not a resample. Every component must keep at least one
resolution: a reduction that consumes some component’s whole pyramid is
rejected as Error::Unsupported.
Implementations§
Source§impl DecodeOptions
impl DecodeOptions
Sourcepub fn with_resolution_reduction(self, levels: u8) -> Self
pub fn with_resolution_reduction(self, levels: u8) -> Self
These options with
resolution_reduction set to levels.
Trait Implementations§
Source§impl Clone for DecodeOptions
impl Clone for DecodeOptions
impl Copy for DecodeOptions
Source§impl Debug for DecodeOptions
impl Debug for DecodeOptions
Auto Trait Implementations§
impl Freeze for DecodeOptions
impl RefUnwindSafe for DecodeOptions
impl Send for DecodeOptions
impl Sync for DecodeOptions
impl Unpin for DecodeOptions
impl UnsafeUnpin for DecodeOptions
impl UnwindSafe for DecodeOptions
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