Reputation: 7403
How does one specify lifetimes on macro derives?
#[derive(ElasticType, Serialize, Deserialize)]
pub struct Xkcd<'a> {
link: &'a str
}
Error example:
#[derive(ElasticType, Serialize, Deserialize)]
| ^^^^^^^^^^^ expected lifetime parameter
Upvotes: 0
Views: 400
Reputation: 1177
In your piece of code you simply can not fix this issue. It's a bug in the crate providing #[derive(ElasticType)]
.
File a bug with the author of ElasticType
! If it's not possible for some reason to add support for lifetimed struct it should at least emit a useful error message stating so.
Upvotes: 2