pub struct MiddlewareStack { /* private fields */ }Expand description
Fluent middleware stack builder.
Middleware are applied in reverse order (last added = outermost). The builder ensures correct ordering for common patterns.
Implementations§
Source§impl MiddlewareStack
impl MiddlewareStack
pub fn new() -> Self
Sourcepub fn compression(self) -> Self
pub fn compression(self) -> Self
Enable response compression (gzip).
Sourcepub fn no_tracing(self) -> Self
pub fn no_tracing(self) -> Self
Disable trace layer.
Sourcepub fn security_headers(self) -> Self
pub fn security_headers(self) -> Self
Enable OWASP security headers.
Sourcepub fn request_logging(self) -> Self
pub fn request_logging(self) -> Self
Enable configurable request logging.
Sourcepub fn no_handler_metrics(self) -> Self
pub fn no_handler_metrics(self) -> Self
Disable per-handler metrics.
Sourcepub fn no_request_tracker(self) -> Self
pub fn no_request_tracker(self) -> Self
Disable request tracker.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MiddlewareStack
impl RefUnwindSafe for MiddlewareStack
impl Send for MiddlewareStack
impl Sync for MiddlewareStack
impl Unpin for MiddlewareStack
impl UnsafeUnpin for MiddlewareStack
impl UnwindSafe for MiddlewareStack
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