vidi-router

Crates.iovidi-router
lib.rsvidi-router
version0.1.0
created_at2025-12-06 20:19:57.33645+00
updated_at2025-12-06 20:19:57.33645+00
descriptionThe router for Vidi
homepagehttps://vidi.viz.rs
repositoryhttps://github.com/viz-rs/vidi
max_upload_size
id1970707
size72,999
Fangdun Tsai (fundon)

documentation

https://docs.rs/vidi-router

README

Vidi

Robust Routing for Vidi

Safety! Docs.rs docs Crates.io version Download

Example

use vidi_core::{IntoHandler, IntoResponse, Response, Result, Request};
use vidi_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

This project is licensed under the MIT license.

Author

Commit count: 0

cargo fmt