I've been searching for a while, but I can't seem to find anything that would tell me how to see why my derive
statement is not working. What is the magic incantation to show me what code is being generated?
I'm working with rocket.rs and trying to #[derive(Serialize)]
a custom struct. but it's telling me that I haven't satisfied the trait?
The following code:
Produces the following error: (sorry about the module name, it came out of my frustration with the derive macro!)
❯ cargo build
Compiling derive-hate v0.1.0 (file:///Users/scull7/code/Rust/derive-hate)
error[E0277]: the trait boundFoo: serde::ser::Serialize
is not satisfied
--> src/main.rs:35:1
|
35 | #[post("/foo", data = "")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the traitserde::ser::Serialize
is not implemented forFoo
|
= note: required because of the requirements on the impl ofrocket::response::Responder<'_>
forrocket_contrib::JSON<Foo>
= note: required byrocket::handler::<impl rocket::Outcome<rocket::Response<'r>, rocket::http::Status, rocket::Data>>::of
error: aborting due to previous error
error: Could not compile
derive-hate
.
To learn more, run the command again with --verbose.