1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-04-20 14:57:01 +00:00

doc & ui-test for FromBody

This commit is contained in:
Dominic 2020-05-05 19:31:02 +02:00
parent e7e55514a2
commit aa9fa0f457
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
6 changed files with 66 additions and 16 deletions

View file

@ -0,0 +1,12 @@
#[macro_use] extern crate gotham_restful;
#[derive(FromBody)]
enum FromBodyEnum
{
SomeVariant(Vec<u8>),
OtherVariant(String)
}
fn main()
{
}

View file

@ -0,0 +1,5 @@
error: #[derive(FromBody)] only works for structs
--> $DIR/from_body_enum.rs:4:1
|
4 | enum FromBodyEnum
| ^^^^