pub struct RequestPipeline { /* private fields */ }
Expand description
The main request processing pipeline
Implementations§
Source§impl RequestPipeline
impl RequestPipeline
Sourcepub fn new(matcher: RouteMatcher) -> Self
pub fn new(matcher: RouteMatcher) -> Self
Create a new request pipeline with a route matcher
Sourcepub fn add_global_middleware<M>(self, middleware: M) -> Selfwhere
M: Middleware + 'static,
pub fn add_global_middleware<M>(self, middleware: M) -> Selfwhere
M: Middleware + 'static,
Add global middleware that runs for all requests
Sourcepub fn add_middleware_group<S: Into<String>>(
self,
name: S,
pipeline: MiddlewarePipelineV2,
) -> Self
pub fn add_middleware_group<S: Into<String>>( self, name: S, pipeline: MiddlewarePipelineV2, ) -> Self
Add a named middleware group for route-specific execution
Sourcepub fn add_handler<S: Into<String>, F>(self, route_id: S, handler: F) -> Self
pub fn add_handler<S: Into<String>, F>(self, route_id: S, handler: F) -> Self
Register a handler for a specific route ID
Sourcepub async fn process(&self, request: ElifRequest) -> ElifResponse
pub async fn process(&self, request: ElifRequest) -> ElifResponse
Process an incoming request through the complete pipeline
Sourcepub fn stats(&self) -> PipelineStats
pub fn stats(&self) -> PipelineStats
Get statistics about the pipeline
Sourcepub fn matcher(&self) -> &RouteMatcher
pub fn matcher(&self) -> &RouteMatcher
Get the route matcher for introspection
Sourcepub fn global_middleware(&self) -> &MiddlewarePipelineV2
pub fn global_middleware(&self) -> &MiddlewarePipelineV2
Get global middleware pipeline for introspection
Sourcepub fn middleware_groups(&self) -> &HashMap<String, MiddlewarePipelineV2>
pub fn middleware_groups(&self) -> &HashMap<String, MiddlewarePipelineV2>
Get middleware groups for introspection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestPipeline
impl !RefUnwindSafe for RequestPipeline
impl Send for RequestPipeline
impl Sync for RequestPipeline
impl Unpin for RequestPipeline
impl !UnwindSafe for RequestPipeline
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