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

Add setters to object codegen #304

Open
sfackler opened this issue Feb 19, 2024 · 1 comment
Open

Add setters to object codegen #304

sfackler opened this issue Feb 19, 2024 · 1 comment

Comments

@sfackler
Copy link
Member

We currently generate immutable structs for Conjure objects, and require them to be converted back into a builder to be modified. This matches the behavior of conjure-java, but feels unnecessary in Rust since it has more robust ownership and mutability semantics.

We should instead just add setters to the generated structs and leave the builders for initial construction.

@sfackler
Copy link
Member Author

sfackler commented Apr 9, 2024

Alternatively, we could just make the fields public. That would also allow people to move out of them.

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