File: simple-fail.rs

package info (click to toggle)
rust-actix-web-codegen 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 272 kB
  • sloc: makefile: 2
file content (30 lines) | stat: -rw-r--r-- 499 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use actix_web_codegen::*;

#[get("/one", other)]
async fn one() -> String {
    "Hello World!".to_owned()
}

#[post(/two)]
async fn two() -> String {
    "Hello World!".to_owned()
}

static PATCH_PATH: &str = "/three";

#[patch(PATCH_PATH)]
async fn three() -> String {
    "Hello World!".to_owned()
}

#[delete("/four", "/five")]
async fn four() -> String {
    "Hello World!".to_owned()
}

#[delete("/five", method="GET")]
async fn five() -> String {
    "Hello World!".to_owned()
}

fn main() {}