pub struct MiddlewareContentType {
pub auto_detect: Option<bool>,
}Expand description
ContentType holds the content-type middleware configuration. This middleware exists to enable the correct behavior until at least the default one can be changed in a future version.
Fields§
§auto_detect: Option<bool>AutoDetect specifies whether to let the Content-Type header, if it has not been set by the backend,
be automatically set to a value derived from the contents of the response.
Deprecated: AutoDetect option is deprecated, Content-Type middleware is only meant to be used to enable the content-type detection, please remove any usage of this option.
Trait Implementations§
Source§impl Clone for MiddlewareContentType
impl Clone for MiddlewareContentType
Source§fn clone(&self) -> MiddlewareContentType
fn clone(&self) -> MiddlewareContentType
Returns a duplicate of the value. Read more
1.0.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 MiddlewareContentType
impl Debug for MiddlewareContentType
Source§impl Default for MiddlewareContentType
impl Default for MiddlewareContentType
Source§fn default() -> MiddlewareContentType
fn default() -> MiddlewareContentType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MiddlewareContentType
impl<'de> Deserialize<'de> for MiddlewareContentType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MiddlewareContentType
impl PartialEq for MiddlewareContentType
Source§impl Serialize for MiddlewareContentType
impl Serialize for MiddlewareContentType
impl StructuralPartialEq for MiddlewareContentType
Auto Trait Implementations§
impl Freeze for MiddlewareContentType
impl RefUnwindSafe for MiddlewareContentType
impl Send for MiddlewareContentType
impl Sync for MiddlewareContentType
impl Unpin for MiddlewareContentType
impl UnwindSafe for MiddlewareContentType
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