pub enum EncodingLogic {
All,
Default,
Zstd,
Brotli,
Gzip,
Deflate,
Snappy,
Bzip2,
Lz4,
None,
Custom(fn(&str, &[u8]) -> Pin<Box<dyn Future<Output = Result<EncodedData, ()>> + Send>>),
}Expand description
for encoding configurations
Variants§
All
to support all encoding algorithms
Default
works as well as EncodingLogic::All option
Zstd
for providing zstd encoding only
Brotli
for providing brotli encoding only
Gzip
for providing gzip encoding only
Deflate
for providing deflate encoding only
Snappy
for providing Snappy encoding only
Bzip2
for providing Bzip2 encoding only
Lz4
for providing Lz4 encoding only
None
to never encode response
Custom(fn(&str, &[u8]) -> Pin<Box<dyn Future<Output = Result<EncodedData, ()>> + Send>>)
when custom creating encoding logic
Trait Implementations§
Source§impl Debug for EncodingLogic
impl Debug for EncodingLogic
impl Send for EncodingLogic
Auto Trait Implementations§
impl Freeze for EncodingLogic
impl RefUnwindSafe for EncodingLogic
impl Sync for EncodingLogic
impl Unpin for EncodingLogic
impl UnwindSafe for EncodingLogic
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