#[non_exhaustive]pub enum EncodeBody {
Automatic,
Manual,
}
Expand description
Control how the body of the response will be encoded by the runtime before it is returned to the user.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Automatic
Response body will be compressed according to the content-encoding header when transmitting. This is the default.
Manual
Response body will be returned as-is, allowing to return pre-compressed data. The matching content-encoding header must be set manually.
Trait Implementations§
source§impl Clone for EncodeBody
impl Clone for EncodeBody
source§fn clone(&self) -> EncodeBody
fn clone(&self) -> EncodeBody
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EncodeBody
impl Debug for EncodeBody
source§impl Default for EncodeBody
impl Default for EncodeBody
source§fn default() -> EncodeBody
fn default() -> EncodeBody
Returns the “default value” for a type. Read more
impl Copy for EncodeBody
Auto Trait Implementations§
impl Freeze for EncodeBody
impl RefUnwindSafe for EncodeBody
impl Send for EncodeBody
impl Sync for EncodeBody
impl Unpin for EncodeBody
impl UnwindSafe for EncodeBody
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)