Skip to main content

handle_func

Function handle_func 

Source
pub fn handle_func<F>(pattern: &str, f: F)
where F: Fn(&mut dyn ResponseWriter, &mut Request) + Send + Sync + 'static,
Expand description

Register a function on the DefaultServeMux. Port of Go’s http.HandleFunc.