diff options
| author | Fuwn <[email protected]> | 2025-07-08 06:10:34 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-08 06:10:34 +0000 |
| commit | 13b9acc457e4c97b2a8187ade39128c4c4866fab (patch) | |
| tree | e0fc53d9a686b102782f55a364f38a0f489ea94f | |
| parent | docs(router): Update options-related documentation (diff) | |
| download | windmark-13b9acc457e4c97b2a8187ade39128c4c4866fab.tar.xz windmark-13b9acc457e4c97b2a8187ade39128c4c4866fab.zip | |
docs(README): Fix example use declarations
| -rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -53,16 +53,16 @@ tokio = { version = "1.26.0", features = ["full"] } ```rust // src/main.rs -// ... +use windmark::response::Response; #[windmark::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { windmark::router::Router::new() .set_private_key_file("windmark_private.pem") .set_certificate_file("windmark_public.pem") - .mount("/", windmark::success!("Hello, World!")) + .mount("/", |_| Response::success("Hello, World!")) .set_error_handler(|_| - windmark::response::Response::permanent_failure("This route does not exist!") + Response::permanent_failure("This route does not exist!") ) .run() .await @@ -74,14 +74,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { ```rust // src/main.rs -// ... +use windmark::response::Response; #[rossweisse::router] struct Router; #[rossweisse::router] impl Router { - #[route(index)] + #[rossweisse::route(index)] pub fn index( _context: windmark::context::RouteContext, ) -> Response { |