Closed phrohdoh closed 5 years ago
I'd like to be able to use the following generic structs:
#[derive(Response)] pub struct SingleResponse<T> where T: Serialize { pub item: T } #[derive(Response)] pub struct MultiResponse<T> where T: Serialize { pub items: Vec<T> }
But I get the following compilation error:
--> src/services/api/mod.rs:8:10 | 8 | #[derive(Response)] | ^^^^^^^^ expected 1 type argument
Is what I want to do possible, and if so how?
It should! I will investigate.
You shouldn't need the bound on the struct.
I'd like to be able to use the following generic structs:
But I get the following compilation error:
Is what I want to do possible, and if so how?