pub struct BodyLimitLayer;Expand description
§Body Limit Layer
This structs represents the Body Limit Layer which restricts the size of incoming request bodies.
The layer is in fact a ServiceBuilder that applies a body size limit
and maps responses to sword standardized responses.
Implementations§
Source§impl BodyLimitLayer
impl BodyLimitLayer
pub fn new( config: &BodyLimitConfig, ) -> ServiceBuilder<Stack<MapResponseLayer<fn(Response<Body>) -> Response<Body>>, Stack<RequestBodyLimitLayer, Identity>>>
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