pub struct CompressionConfigBuilder { /* private fields */ }Expand description
Builder for CompressionConfig
Implementations§
Source§impl CompressionConfigBuilder
impl CompressionConfigBuilder
Sourcepub fn algorithm(self, algorithm: CompressionAlgorithm) -> Self
pub fn algorithm(self, algorithm: CompressionAlgorithm) -> Self
Set the compression algorithm
Sourcepub fn compressible_types(self, types: Vec<String>) -> Self
pub fn compressible_types(self, types: Vec<String>) -> Self
Set the compressible content types
Sourcepub fn add_compressible_type(self, content_type: impl Into<String>) -> Self
pub fn add_compressible_type(self, content_type: impl Into<String>) -> Self
Add a compressible content type
Sourcepub fn compress_encoded(self, compress: bool) -> Self
pub fn compress_encoded(self, compress: bool) -> Self
Set whether to compress already-encoded responses
Sourcepub fn no_compression(self) -> Self
pub fn no_compression(self) -> Self
Disable compression
Sourcepub fn build(self) -> CompressionConfig
pub fn build(self) -> CompressionConfig
Build the configuration
Trait Implementations§
Source§impl Clone for CompressionConfigBuilder
impl Clone for CompressionConfigBuilder
Source§fn clone(&self) -> CompressionConfigBuilder
fn clone(&self) -> CompressionConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompressionConfigBuilder
impl Debug for CompressionConfigBuilder
Source§impl Default for CompressionConfigBuilder
impl Default for CompressionConfigBuilder
Source§fn default() -> CompressionConfigBuilder
fn default() -> CompressionConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompressionConfigBuilder
impl RefUnwindSafe for CompressionConfigBuilder
impl Send for CompressionConfigBuilder
impl Sync for CompressionConfigBuilder
impl Unpin for CompressionConfigBuilder
impl UnwindSafe for CompressionConfigBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging