pub struct CompressionLayer;Expand description
§Compression Layer
This struct represents the Compression Layer which enables response compression based on the provided configuration.
The layer is a wrapper around tower_http::compression::CompressionLayer.
Compress response bodies of the underlying service.
This uses the Accept-Encoding header to pick an appropriate encoding and adds the Content-Encoding header to responses.
Implementations§
Source§impl CompressionLayer
impl CompressionLayer
pub fn new(config: &CompressionConfig) -> TowerCompressionLayer
Auto Trait Implementations§
impl Freeze for CompressionLayer
impl RefUnwindSafe for CompressionLayer
impl Send for CompressionLayer
impl Sync for CompressionLayer
impl Unpin for CompressionLayer
impl UnwindSafe for CompressionLayer
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