1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

clarify docs for BodyEncoding::encoding() (#2258)

This commit is contained in:
Ali MJ Al-Nasrawy 2021-06-10 17:38:35 +03:00 committed by GitHub
parent e46cda5228
commit 812269d656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -235,6 +235,8 @@ impl NamedFile {
}
/// Set content encoding for serving this file
///
/// Must be used with [`actix_web::middleware::Compress`] to take effect.
#[inline]
pub fn set_content_encoding(mut self, enc: ContentEncoding) -> Self {
self.encoding = Some(enc);

View File

@ -169,6 +169,8 @@ pub mod dev {
fn get_encoding(&self) -> Option<ContentEncoding>;
/// Set content encoding
///
/// Must be used with [`crate::middleware::Compress`] to take effect.
fn encoding(&mut self, encoding: ContentEncoding) -> &mut Self;
}