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

#[typeshare(rename = "...")] #137

Open
HHogg opened this issue Jul 21, 2023 · 0 comments
Open

#[typeshare(rename = "...")] #137

HHogg opened this issue Jul 21, 2023 · 0 comments

Comments

@HHogg
Copy link

HHogg commented Jul 21, 2023

Typeshare currently uses the serde rename attribute to rename the output type but when using custom serialisation (not using the derived Serialization), it's not possible to use the Serdes rename attribute.

I can't see there's another way to pass a rename option to typeshare, but if not a #[typeshare(rename = "...")] attribute would be good.

#[typeshare(rename = "SomethingElse"]
struct MyStruct { ... }

impl Serialize for MyStruct { ... }
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

1 participant