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 | dd56b25e9adf0ab604cfd491465a6428d5d741af (patch) | |
| tree | e0fc53d9a686b102782f55a364f38a0f489ea94f /README.md | |
| parent | docs(router): Update options-related documentation (diff) | |
| download | windmark-dd56b25e9adf0ab604cfd491465a6428d5d741af.tar.xz windmark-dd56b25e9adf0ab604cfd491465a6428d5d741af.zip | |
docs(README): Fix example use declarations
Diffstat (limited to 'README.md')
| -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 { |