pub struct BodyLimitMiddleware { /* private fields */ }Expand description
Body size limit middleware.
Rejects requests whose body exceeds the configured maximum size.
Implementations§
Source§impl BodyLimitMiddleware
impl BodyLimitMiddleware
pub const fn new(config: BodyLimitConfig) -> Self
Trait Implementations§
Source§impl Debug for BodyLimitMiddleware
impl Debug for BodyLimitMiddleware
Source§impl Middleware for BodyLimitMiddleware
impl Middleware for BodyLimitMiddleware
Source§fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called before the request is dispatched to plugins. Read more
Source§fn after_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = AuthResult<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn after_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = AuthResult<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called after a response has been produced. Read more
Auto Trait Implementations§
impl Freeze for BodyLimitMiddleware
impl RefUnwindSafe for BodyLimitMiddleware
impl Send for BodyLimitMiddleware
impl Sync for BodyLimitMiddleware
impl Unpin for BodyLimitMiddleware
impl UnsafeUnpin for BodyLimitMiddleware
impl UnwindSafe for BodyLimitMiddleware
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