Struct gotham::router::builder::DelegateRouteBuilder
source · pub struct DelegateRouteBuilder<'a, M, C, P>where
M: RouteMatcher + Send + Sync + 'static,
C: PipelineHandleChain<P> + Copy + Send + Sync + 'static,
P: Send + Sync + 'static,{ /* private fields */ }
Expand description
A delegated builder, which is created by DrawRoutes::delegate
and returned. The DrawRoutes
trait has documentation for using this type.
Implementations§
source§impl<'a, M, C, P> DelegateRouteBuilder<'a, M, C, P>where
M: RouteMatcher + Send + Sync + 'static,
C: PipelineHandleChain<P> + Copy + Send + Sync + 'static,
P: RefUnwindSafe + Send + Sync + 'static,
impl<'a, M, C, P> DelegateRouteBuilder<'a, M, C, P>where
M: RouteMatcher + Send + Sync + 'static,
C: PipelineHandleChain<P> + Copy + Send + Sync + 'static,
P: RefUnwindSafe + Send + Sync + 'static,
sourcepub fn add_route_matcher<NM: RouteMatcher + Send + Sync + 'static>(
self,
matcher: NM
) -> DelegateRouteBuilder<'a, AndRouteMatcher<M, NM>, C, P>
pub fn add_route_matcher<NM: RouteMatcher + Send + Sync + 'static>(
self,
matcher: NM
) -> DelegateRouteBuilder<'a, AndRouteMatcher<M, NM>, C, P>
Adds additional RouteMatcher
requirements to the current delegate.