mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 21:12:28 +00:00
20 lines
318 B
Rust
20 lines
318 B
Rust
|
#[macro_use]
|
||
|
extern crate gotham_restful;
|
||
|
use gotham_restful::gotham::hyper::Method;
|
||
|
|
||
|
#[derive(Resource)]
|
||
|
#[resource(endpoint)]
|
||
|
struct FooResource;
|
||
|
|
||
|
#[derive(Debug)]
|
||
|
struct FooBody {
|
||
|
foo: String
|
||
|
}
|
||
|
|
||
|
#[endpoint(method = "Method::GET", uri = "", body = true)]
|
||
|
fn endpoint(_: FooBody) {
|
||
|
unimplemented!()
|
||
|
}
|
||
|
|
||
|
fn main() {}
|