pub struct ContentValidationConfig {
pub max_content_length: usize,
pub allowed_content_types: Vec<String>,
pub require_content_type: bool,
}Expand description
Content validation middleware configuration
Fields§
§max_content_length: usizeMaximum allowed Content-Length in bytes (default: 10MB)
allowed_content_types: Vec<String>Allowed Content-Type values (default: application/json, application/pjs+json)
require_content_type: boolRequire Content-Type header for POST/PUT/PATCH (default: true)
Trait Implementations§
Source§impl Clone for ContentValidationConfig
impl Clone for ContentValidationConfig
Source§fn clone(&self) -> ContentValidationConfig
fn clone(&self) -> ContentValidationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContentValidationConfig
impl Debug for ContentValidationConfig
Auto Trait Implementations§
impl Freeze for ContentValidationConfig
impl RefUnwindSafe for ContentValidationConfig
impl Send for ContentValidationConfig
impl Sync for ContentValidationConfig
impl Unpin for ContentValidationConfig
impl UnsafeUnpin for ContentValidationConfig
impl UnwindSafe for ContentValidationConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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