You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T and B serve different purposes; T is a type that implements Serialize, whilst B is a type that implements Body.
client.indices().put_template() returns a new instance of IndicesPutTemplate<'a, 'b, ()> where B is (). Then when body() is later called, it returns a new instance of IndicesPutTemplate where B is JsonBody<T>.
If the body call were constrained to B, then a user would need to wrap any type that implements Serialize in JsonBody e.g. JsonBody(json!({ })), which feels more cumbersome to use that simply passing the type. Accepting B would however have the benefit of accepting other Body implementations like String, &[u8], etc.
In the future, T may end up being a specific type for IndicesPutTemplate (#75), though it's not definite how this will be implemented; your thoughts are welcome on #75.
Describe the bug
A clear and concise description of what the bug is.
https://docs.rs/elasticsearch/7.9.0-alpha.1/src/elasticsearch/generated/namespace_clients/indices.rs.html#6203-6205 has a bound B but it's not necessary and redundant to T in https://docs.rs/elasticsearch/7.9.0-alpha.1/src/elasticsearch/generated/namespace_clients/indices.rs.html#6230
To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
rustc --version
]Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: