pub struct RouterService<H = Box<dyn Handler + Send + Sync>> { /* private fields */ }
Implementations§
Source§impl<H> RouterService<H>where
H: Handler,
impl<H> RouterService<H>where
H: Handler,
pub fn new(default: H) -> Self
pub fn from_router(router: HttpRouter<H>, default: H) -> Self
Trait Implementations§
Source§impl<H: Debug> Debug for RouterService<H>
impl<H: Debug> Debug for RouterService<H>
Source§impl<H> Service<Request<Body>> for RouterService<H>
impl<H> Service<Request<Body>> for RouterService<H>
Source§type Future = Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn Error + Sync + Send>>> + Send>>
The future response value.
Auto Trait Implementations§
impl<H> Freeze for RouterService<H>where
H: Freeze,
impl<H> RefUnwindSafe for RouterService<H>where
H: RefUnwindSafe,
impl<H> Send for RouterService<H>where
H: Send,
impl<H> Sync for RouterService<H>where
H: Sync,
impl<H> Unpin for RouterService<H>where
H: Unpin,
impl<H> UnwindSafe for RouterService<H>where
H: UnwindSafe,
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