Merge branch 'master' into master

This commit is contained in:
Rob Ede 2021-06-10 16:00:25 +01:00 committed by GitHub
commit 2750fd559c
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 /// Set content encoding for serving this file
///
/// Must be used with [`actix_web::middleware::Compress`] to take effect.
#[inline] #[inline]
pub fn set_content_encoding(mut self, enc: ContentEncoding) -> Self { pub fn set_content_encoding(mut self, enc: ContentEncoding) -> Self {
self.encoding = Some(enc); self.encoding = Some(enc);

View File

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