Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why not support struct with generic?? quick_xml can do it!!! #187

Closed
xfront opened this issue May 29, 2024 · 4 comments
Closed

why not support struct with generic?? quick_xml can do it!!! #187

xfront opened this issue May 29, 2024 · 4 comments

Comments

@xfront
Copy link
Contributor

xfront commented May 29, 2024

#[derive(Serialize, YaSerialize, Debug)]
    struct Envelop<T> {
        body: T,
    }

 struct Envelop<T> {
    |            ^^^^^^^ -
help: add missing generic argument
    |
147 |     struct Envelop<T><T> {
    |                   +++
@mtorromeo
Copy link

See #156

@antis81
Copy link

antis81 commented Jun 19, 2024

I ended up using quick_xml/serde for deserialization and yaserde for serialization (into a custom format). Serialization into formats other than XML is where yaserde shines. 🌞

(for reference/example here is my public code on gitlab https://gitlab.com/antis81/many-ui)

@MarcAntoine-Arnaud
Copy link
Contributor

Generics are now supported via #189
It's available in latest published version (0.10.1)

@MarcAntoine-Arnaud
Copy link
Contributor

I close the issue as I consider it's addressed. Re-open it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants