[−][src]Struct barc::BrotliCompressStrategy
Strategy for Brotli compression. Will only compress if a minimum length of compressible bytes, from the response and request bodies and headers is found.
Methods
impl BrotliCompressStrategy
[src]
pub fn set_min_len(self, size: u64) -> Self
[src]
Set minimum length of compressible bytes required to use compression. Default: 1 KiB.
pub fn set_compression_level(self, level: u32) -> Self
[src]
Set the compression level to use, typically on a scale of 0-9 where 0 is no compression and 9 is highest (and slowest) compression. Default: 6.
pub fn set_check_identity(self, check: bool) -> Self
[src]
Set whether to check the meta -decoded header for an "identity" value, as proof that the content-type header actually characterizes the associated body.
For example, body_image_futio::decode_res_body
as of crate version
1.1.0, will set this value on an original Dialog
, which is preserved
when converted to a Record
for barc write.
Default: true (changed in 2.0.0)
Trait Implementations
impl Clone for BrotliCompressStrategy
[src]
fn clone(&self) -> BrotliCompressStrategy
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CompressStrategy for BrotliCompressStrategy
[src]
fn wrap_encoder<'a>(
&self,
rec: &dyn MetaRecorded,
file: &'a File
) -> Result<EncodeWrapper<'a>, BarcError>
[src]
&self,
rec: &dyn MetaRecorded,
file: &'a File
) -> Result<EncodeWrapper<'a>, BarcError>
fn min_len(&self) -> u64
[src]
fn check_identity(&self) -> bool
[src]
fn non_compressible_coef(&self) -> f64
[src]
fn is_compressible(&self, rec: &dyn MetaRecorded) -> bool
[src]
impl Copy for BrotliCompressStrategy
[src]
impl Debug for BrotliCompressStrategy
[src]
impl Default for BrotliCompressStrategy
[src]
Auto Trait Implementations
impl RefUnwindSafe for BrotliCompressStrategy
impl Send for BrotliCompressStrategy
impl Sync for BrotliCompressStrategy
impl Unpin for BrotliCompressStrategy
impl UnwindSafe for BrotliCompressStrategy
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,