Struct mini_server::Path
source · pub struct Path {
pub name: &'static str,
pub handler: RequestHandler,
pub method: HTTPMethod,
}
Fields§
§name: &'static str
§handler: RequestHandler
§method: HTTPMethod
Implementations§
source§impl Path
impl Path
pub fn new( name: &'static str, handler: RequestHandler, method: HTTPMethod ) -> Self
pub fn handle_request(&self, request: HTTPRequest) -> HTTPResponse
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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