pub struct ContentLimits {
pub max_request_size: Option<u64>,
pub allowed_content_types: Option<Vec<String>>,
}Expand description
The route-level content limits (the reference RouteConfig.max_request_size
and RouteConfig.allowed_content_types).
The default is both fields unset: the gate is inert and every request
passes, the reference’s no-decorator shape (applies_to registers the
check only when a route carries either limit).
Fields§
§max_request_size: Option<u64>max_request_size: the largest accepted content-length in bytes.
None (or the reference’s 0-falsy shape) skips the size check.
allowed_content_types: Option<Vec<String>>allowed_content_types: the exact media types accepted. None skips
the type check; an empty list behaves like None (the reference only
registers the check for a truthy list).
Implementations§
Trait Implementations§
Source§impl Clone for ContentLimits
impl Clone for ContentLimits
Source§impl Debug for ContentLimits
impl Debug for ContentLimits
Source§impl Default for ContentLimits
impl Default for ContentLimits
impl Eq for ContentLimits
Source§impl PartialEq for ContentLimits
impl PartialEq for ContentLimits
impl StructuralPartialEq for ContentLimits
Auto Trait Implementations§
impl Freeze for ContentLimits
impl RefUnwindSafe for ContentLimits
impl Send for ContentLimits
impl Sync for ContentLimits
impl Unpin for ContentLimits
impl UnsafeUnpin for ContentLimits
impl UnwindSafe for ContentLimits
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.