Passing generic enums in Warp query

115 Views Asked by At

I have an enum that is serde serializable in Rust.The enum has generics involved. Is there a way to get warp to accept this enum as a part of a warp query.

enum A<T> {
 a(T),
}

such that we can have ,

let route = warp::get()
            .and(warp::path(“/“)
            .and(warp::query::A<T>)
            ….

I have tried a lot of ways but warp seems to throw a compilation error.

0

There are 0 best solutions below