Documentation

Example

use viz_core::{IntoHandler, IntoResponse, Response, Result, Request};
use viz_router::{get, Router};

async fn index() -> Result<impl IntoResponse> {
  Ok(())
}

async fn ws(_: Request) -> Result<Response> {
  Ok(())
}

let app = Router::new()
    .route("/", get(index.into_handler()))
    .route("/ws/:name", get(ws));

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Viz by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.