mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 06:54:46 +00:00
Replace methods with more flexible endpoints
This commit is contained in:
parent
0ac0f0f504
commit
b807ae2796
87 changed files with 1497 additions and 1512 deletions
10
tests/ui/from_body/enum.rs
Normal file
10
tests/ui/from_body/enum.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
#[macro_use]
|
||||
extern crate gotham_restful;
|
||||
|
||||
#[derive(FromBody)]
|
||||
enum FromBodyEnum {
|
||||
SomeVariant(Vec<u8>),
|
||||
OtherVariant(String)
|
||||
}
|
||||
|
||||
fn main() {}
|
5
tests/ui/from_body/enum.stderr
Normal file
5
tests/ui/from_body/enum.stderr
Normal file
|
@ -0,0 +1,5 @@
|
|||
error: #[derive(FromBody)] only works for structs
|
||||
--> $DIR/enum.rs:5:1
|
||||
|
|
||||
5 | enum FromBodyEnum {
|
||||
| ^^^^
|
Loading…
Add table
Add a link
Reference in a new issue