Open 0xpr03 opened 5 years ago
The Response derive isn't handing down debug derives.
Response
For example the following won't work:
#[derive(Debug, Response)] pub struct ApiResponse<T> where T: Serialize + Debug, { pub value: Option<T>, pub msg: Option<String>, }
Will throw
error[E0277]: `T` doesn't implement `std::fmt::Debug` --> src/models.rs:122:17 | 122 | #[derive(Debug, Response)] | ^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
I was told that serde is handling this via attributes which tower-web probably also would have to implement.
Note: the above example won't compile, even without Debug-Derive as tower-web seems to require debug internally, which T doesn't receive.
Debug
Thanks for the report 👍
The
Response
derive isn't handing down debug derives.For example the following won't work:
Will throw
I was told that serde is handling this via attributes which tower-web probably also would have to implement.