pub struct EncoderConfiguration {
pub method: EncoderMethod,
pub options: Option<EncoderOptions>,
}
Available on crate feature
compress
only.Expand description
Configuration for encoding methods when compressing data.
Combines an encoder method with optional encoder-specific options.
Fields§
§method: EncoderMethod
The encoder method to use.
options: Option<EncoderOptions>
Optional encoder-specific options.
Implementations§
Source§impl EncoderConfiguration
impl EncoderConfiguration
Sourcepub fn new(method: EncoderMethod) -> Self
pub fn new(method: EncoderMethod) -> Self
Creates a new encoder configuration with the specified method.
§Arguments
method
- The encoder method to use
Sourcepub fn with_options(self, options: EncoderOptions) -> Self
pub fn with_options(self, options: EncoderOptions) -> Self
Adds encoder-specific options to this configuration.
§Arguments
options
- The encoder options to apply
Trait Implementations§
Source§impl Clone for EncoderConfiguration
impl Clone for EncoderConfiguration
Source§impl Debug for EncoderConfiguration
impl Debug for EncoderConfiguration
Source§impl Default for EncoderConfiguration
impl Default for EncoderConfiguration
Source§fn default() -> EncoderConfiguration
fn default() -> EncoderConfiguration
Returns the “default value” for a type. Read more
Source§impl From<AesEncoderOptions> for EncoderConfiguration
Available on crate feature aes256
only.
impl From<AesEncoderOptions> for EncoderConfiguration
Available on crate feature
aes256
only.Source§fn from(value: AesEncoderOptions) -> Self
fn from(value: AesEncoderOptions) -> Self
Converts to this type from the input type.
Source§impl From<BrotliOptions> for EncoderConfiguration
Available on crate feature brotli
only.
impl From<BrotliOptions> for EncoderConfiguration
Available on crate feature
brotli
only.Source§fn from(options: BrotliOptions) -> Self
fn from(options: BrotliOptions) -> Self
Converts to this type from the input type.
Source§impl From<Bzip2Options> for EncoderConfiguration
Available on crate feature bzip2
only.
impl From<Bzip2Options> for EncoderConfiguration
Available on crate feature
bzip2
only.Source§fn from(options: Bzip2Options) -> Self
fn from(options: Bzip2Options) -> Self
Converts to this type from the input type.
Source§impl From<DeflateOptions> for EncoderConfiguration
Available on crate feature deflate
only.
impl From<DeflateOptions> for EncoderConfiguration
Available on crate feature
deflate
only.Source§fn from(options: DeflateOptions) -> Self
fn from(options: DeflateOptions) -> Self
Converts to this type from the input type.
Source§impl From<DeltaOptions> for EncoderConfiguration
impl From<DeltaOptions> for EncoderConfiguration
Source§fn from(options: DeltaOptions) -> Self
fn from(options: DeltaOptions) -> Self
Converts to this type from the input type.
Source§impl From<EncoderMethod> for EncoderConfiguration
impl From<EncoderMethod> for EncoderConfiguration
Source§fn from(value: EncoderMethod) -> Self
fn from(value: EncoderMethod) -> Self
Converts to this type from the input type.
Source§impl From<Lz4Options> for EncoderConfiguration
Available on crate feature lz4
only.
impl From<Lz4Options> for EncoderConfiguration
Available on crate feature
lz4
only.Source§fn from(options: Lz4Options) -> Self
fn from(options: Lz4Options) -> Self
Converts to this type from the input type.
Source§impl From<Lzma2Options> for EncoderConfiguration
impl From<Lzma2Options> for EncoderConfiguration
Source§fn from(options: Lzma2Options) -> Self
fn from(options: Lzma2Options) -> Self
Converts to this type from the input type.
Source§impl From<PpmdOptions> for EncoderConfiguration
Available on crate feature ppmd
only.
impl From<PpmdOptions> for EncoderConfiguration
Available on crate feature
ppmd
only.Source§fn from(options: PpmdOptions) -> Self
fn from(options: PpmdOptions) -> Self
Converts to this type from the input type.
Source§impl From<ZstandardOptions> for EncoderConfiguration
Available on crate feature zstd
only.
impl From<ZstandardOptions> for EncoderConfiguration
Available on crate feature
zstd
only.Source§fn from(options: ZstandardOptions) -> Self
fn from(options: ZstandardOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EncoderConfiguration
impl RefUnwindSafe for EncoderConfiguration
impl Send for EncoderConfiguration
impl Sync for EncoderConfiguration
impl Unpin for EncoderConfiguration
impl UnwindSafe for EncoderConfiguration
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