aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-08 06:10:34 +0000
committerFuwn <[email protected]>2025-07-08 06:10:34 +0000
commit13b9acc457e4c97b2a8187ade39128c4c4866fab (patch)
treee0fc53d9a686b102782f55a364f38a0f489ea94f
parentdocs(router): Update options-related documentation (diff)
downloadwindmark-13b9acc457e4c97b2a8187ade39128c4c4866fab.tar.xz
windmark-13b9acc457e4c97b2a8187ade39128c4c4866fab.zip
docs(README): Fix example use declarations
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index af48bba..99cbacf 100644
--- a/README.md
+++ b/README.md
@@ -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 {