pub struct Router { /* private fields */ }Implementations§
Source§impl Router
impl Router
Sourcepub fn add_simple_route(
&mut self,
route: &str,
function: fn(Request, &mut Response) -> ReturnData,
)
pub fn add_simple_route( &mut self, route: &str, function: fn(Request, &mut Response) -> ReturnData, )
pub fn add_route_with_params( &mut self, route: &str, function: fn(Request, &mut Response, HashMap<String, String>) -> ReturnData, )
pub fn add_static_file_route(&mut self, route: &str, path: &str)
pub fn does_path_exists(&self, path: &str) -> Option<String>
pub fn route_handler_from_path(&self, path: String) -> Option<RouteHandler>
Trait Implementations§
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