pub struct Router { /* private fields */ }Implementations§
Source§impl Router
impl Router
pub fn new() -> Router
pub fn add_middleware(&mut self, mw: HandlerObj)
pub fn add_route( &mut self, route: &'static str, value: HandlerObj, ) -> Result<&mut Node, RouterError>
pub fn get( &self, path: &str, ) -> Result<impl Iterator<Item = HandlerObj>, RouterError>
Trait Implementations§
Source§impl Service<Request<Body>> for Router
impl Service<Request<Body>> for Router
Auto Trait Implementations§
impl !RefUnwindSafe for Router
impl !UnwindSafe for Router
impl Freeze for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl UnsafeUnpin 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