pub struct BodyLimitLayer { /* private fields */ }Available on crate feature
server only.Expand description
Layer for limiting body size
See BodyLimitLayer::new for more details.
Implementations§
Source§impl BodyLimitLayer
impl BodyLimitLayer
Sourcepub fn new(body_limit: usize) -> Self
pub fn new(body_limit: usize) -> Self
Create a new BodyLimitLayer with given body_limit.
If the Body is larger than the body_limit, the request will be rejected.
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 moreAuto 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