mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
clarify docs for BodyEncoding::encoding() (#2258)
This commit is contained in:
parent
e46cda5228
commit
812269d656
@ -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);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user