#[non_exhaustive]pub struct Options {
pub quality: u8,
pub alpha: Alpha,
pub force_vp8x: bool,
pub filter: Filter,
}Expand description
Settings for one encode.
In version 0.1.0, Options::default uses quality 75 and keeps alpha
lossless. Its Filter::Auto setting signals loop filter level 0. The
default writes VP8X only when transparency needs it or
Options::force_vp8x requests it.
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.quality: u8Quality on cwebp’s 0 to 100 scale, with larger values saturated at 100.
alpha: AlphaTreatment of the alpha plane.
force_vp8x: boolWrite a VP8X container header even for an opaque image.
An opaque image otherwise gets a bare VP8 chunk. Set this for a
consumer that wants one container shape for every output.
filter: FilterLoop filter strength.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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