Skip to content

Commit

Permalink
clarify docs for BodyEncoding::encoding() (actix#2258)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemjay authored Jun 10, 2021
1 parent e46cda5 commit 812269d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actix-files/src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 812269d

Please sign in to comment.