pub fn handle_request(request: &Request, server_files: ServerFiles, stats: Arc<ServerStats>) -> Response {
    let path = &request.request_identifiers.path;

    let response = match &path[..] {
        "/stats" => stats_response(stats, server_files.dynamic_files),
        _ => file_response(server_files, path.to_string())
    };

    match response {
        Ok(res) => res,
        Err(res) => res
    }
}
/// Mapping endpoints to the corresponding controller actions
Mapping endpoints to the corresponding controller actions
Mapping endpoints to the corresponding controller actions
pub fn handle_request(request: &Request, server_files: ServerFiles, stats: Arc<ServerStats>) -> Response {
    let path = &request.request_identifiers.path;
    let response = match &path[..] {
        "/stats" => stats_response(stats, server_files.dynamic_files),
        _ => file_response(server_files, path.to_string())
    };
    match response {
        Ok(res) => res,
        Err(res) => res
    }
}
pub fn handle_request ( request : & Request , server_files : ServerFiles , stats : Arc < ServerStats > ) -> Response { let path = & request . request_identifiers . path ; let response = match & path [ .. ] { " " => stats_response ( stats , server_files . dynamic_files ) , _ => file_response ( server_files , path . to_string ( ) ) } ; match response { Ok ( res ) => res , Err ( res ) => res } }
Mapping endpoints to the corresponding controller actions
Mapping endpoints to the corresponding controller actions
request
&Request
server_files
ServerFiles
stats
Arc<ServerStats>
request
&Request
server_files
ServerFiles
stats
Arc<ServerStats>