pub struct Compress<T> { /* private fields */ }
Available on crate feature
compression
only.Expand description
Compresses the response body with the specified algorithm
and sets the Content-Encoding
header.
Implementations§
Trait Implementations§
Source§impl<T: IntoResponse> IntoResponse for Compress<T>
impl<T: IntoResponse> IntoResponse for Compress<T>
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Convert self to HTTP
Response
.Source§fn into_error(self) -> Error
fn into_error(self) -> Error
Convert self to the
Error
.Auto Trait Implementations§
impl<T> Freeze for Compress<T>where
T: Freeze,
impl<T> RefUnwindSafe for Compress<T>where
T: RefUnwindSafe,
impl<T> Send for Compress<T>where
T: Send,
impl<T> Sync for Compress<T>where
T: Sync,
impl<T> Unpin for Compress<T>where
T: Unpin,
impl<T> UnwindSafe for Compress<T>where
T: UnwindSafe,
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