method Router.new
An empty router (every request is a 404 until routes are added).
Example:
use std.http { Router, Request, Reply }
fn main() io {
let r = Router.new().get("/", (req: Request) => Reply.text("home"))
print("built")
}Вывод
built
pub(api) static fn new() -> RouterС версии. 1.0.0-beta
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/http/http.oxl:3329