pub struct BodyLimitLayer { /* private fields */ }Expand description
Body size limit middleware layer
Enforces a maximum size for request bodies. When a request body exceeds the configured limit, a 413 Payload Too Large response is returned.
Implementations§
Source§impl BodyLimitLayer
impl BodyLimitLayer
Sourcepub fn default_limit() -> Self
pub fn default_limit() -> Self
Create a body limit layer with the default limit (1MB)
Trait Implementations§
Source§impl Clone for BodyLimitLayer
impl Clone for BodyLimitLayer
Source§fn clone(&self) -> BodyLimitLayer
fn clone(&self) -> BodyLimitLayer
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 Default for BodyLimitLayer
impl Default for BodyLimitLayer
Source§impl MiddlewareLayer for BodyLimitLayer
impl MiddlewareLayer for BodyLimitLayer
Auto Trait Implementations§
impl Freeze for BodyLimitLayer
impl RefUnwindSafe for BodyLimitLayer
impl Send for BodyLimitLayer
impl Sync for BodyLimitLayer
impl Unpin for BodyLimitLayer
impl UnwindSafe for BodyLimitLayer
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