Skip to content

Support for lifetimed struct #359

Open
@NavyaZaveri

Description

I'm trying to use the ElasticType macro against a struct parameterized on a lifetime, like so:

#[derive(ElasticType, Serialize, Deserialize)]
pub struct Xkcd<'a> {
       link: &'a str
}

This throws an error:

#[derive(ElasticType, Serialize, Deserialize)]
 |       ^^^^^^^^^^^ expected lifetime parameter

As far as I'm aware, Rust doesn't have any semantics for parameterizing macros. If a fix isn't possible, It would be more useful to see an error message stating it's not possible to use ElasticType on a lifetimed struct.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions