Passing generic enums in Warp query

Viewed 45

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 Answers
Related