#[non_exhaustive]
pub struct EncodeOptions { pub quality: Option<u8>, pub effort: Option<u8>, }
Expand description

Custom options when encoding pixel data into an encapsulated form.

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: Option<u8>

The quality of the output image as a number between 0 and 100, where 100 is the best quality that the encapsulated form can achieve and smaller values represent smaller data size with an increasingly higher error. It is ignored if the transfer syntax only supports lossless compression. If it does support lossless compression, it is expected that a quality of 100 results in a lossless encoding.

If this option is not specified, the output quality is decided automatically by the underlying adapter.

§effort: Option<u8>

The amount of effort that the encoder may take to encode the pixel data, as a number between 0 and 100. If supported, higher values result in better compression, at the expense of more processing time. Encoders are not required to support this option. If this option is not specified, the actual effort is decided by the underlying adapter.

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.