Trait actix_web::dev::BodyEncoding
source · [−]pub trait BodyEncoding {
fn get_encoding(&self) -> Option<ContentEncoding>;
fn encoding(&mut self, encoding: ContentEncoding) -> &mut Self;
}
Expand description
Helper trait that allows to set specific encoding for response.
Required Methods
fn get_encoding(&self) -> Option<ContentEncoding>
fn get_encoding(&self) -> Option<ContentEncoding>
Get content encoding
fn encoding(&mut self, encoding: ContentEncoding) -> &mut Self
fn encoding(&mut self, encoding: ContentEncoding) -> &mut Self
Set content encoding
Must be used with [crate::middleware::Compress
] to take effect.