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.
Implementations§
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 JsonSchema for MiddlewareContentType
impl JsonSchema for MiddlewareContentType
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more