pub struct Router {
pub routes: PrefixTreeMap<String, String, Route>,
}
Expand description
Router service to be passed to hyper passed to Server.bind().serve
Fields§
§routes: PrefixTreeMap<String, String, Route>
Implementations§
Trait Implementations§
Source§impl<T> Service<T> for Router
impl<T> Service<T> for Router
Source§type Future = Pin<Box<dyn Future<Output = Result<<Router as Service<T>>::Response, <Router as Service<T>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<Router as Service<T>>::Response, <Router as Service<T>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl Freeze for Router
impl RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl UnwindSafe for Router
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