Hello,
I'm starting to use your crate, it'll help a lot I think ! Thank you !
Tried to do kind of the same as the example and I have an error :
let search_response: Response<MyIndex> = response.json().await?;
Will produce a serde error :
Caused by:
0: error decoding response body: data did not match any variant of untagged enum Response
1: error decoding response body: data did not match any variant of untagged enum Response
2: data did not match any variant of untagged enum Response
If I only assume the response will be Ok I can do this and it's working fine :
let results: OkResponse<MyIndex> = response.json().await?;
let items = results.hits.hits.into_iter().map(|idx| idx.source.payload).collect();
Ok(items)
Hello,
I'm starting to use your crate, it'll help a lot I think ! Thank you !
Tried to do kind of the same as the example and I have an error :
Will produce a serde error :
If I only assume the response will be
OkI can do this and it's working fine :