pub struct Router<TRequest, TResponse, TError>where
TResponse: 'static,
TError: 'static,
TRequest: 'static,{ /* private fields */ }Expand description
A static string-key router.
Build a router with router!. Requests are matched by the value returned
from ExtractKey. Missing keys are routed to the configured fallback
handler.
Implementations§
Trait Implementations§
Source§impl<TRequest, TResponse, TError> Service<TRequest> for Router<TRequest, TResponse, TError>where
TResponse: 'static,
TError: 'static,
TRequest: ExtractKey + 'static,
impl<TRequest, TResponse, TError> Service<TRequest> for Router<TRequest, TResponse, TError>where
TResponse: 'static,
TError: 'static,
TRequest: ExtractKey + 'static,
Auto Trait Implementations§
impl<TRequest, TResponse, TError> Freeze for Router<TRequest, TResponse, TError>
impl<TRequest, TResponse, TError> RefUnwindSafe for Router<TRequest, TResponse, TError>
impl<TRequest, TResponse, TError> Send for Router<TRequest, TResponse, TError>
impl<TRequest, TResponse, TError> Sync for Router<TRequest, TResponse, TError>
impl<TRequest, TResponse, TError> Unpin for Router<TRequest, TResponse, TError>
impl<TRequest, TResponse, TError> UnsafeUnpin for Router<TRequest, TResponse, TError>
impl<TRequest, TResponse, TError> UnwindSafe for Router<TRequest, TResponse, TError>
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