pub trait BodyEncoding {
// Required methods
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§
Sourcefn get_encoding(&self) -> Option<ContentEncoding>
fn get_encoding(&self) -> Option<ContentEncoding>
Get content encoding
Sourcefn encoding(&mut self, encoding: ContentEncoding) -> &mut Self
fn encoding(&mut self, encoding: ContentEncoding) -> &mut Self
Set content encoding
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.