conjure-rust icon indicating copy to clipboard operation
conjure-rust copied to clipboard

Add setters to object codegen

Open sfackler opened this issue 1 year ago • 1 comments

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 avatar Feb 19 '24 14:02 sfackler

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

sfackler avatar Apr 09 '24 16:04 sfackler