Open ADustyOldMuffin opened 10 months ago
I'm curious if we could add setters for fields such as arrays and messages, is there any reason you couldn't? Its quite a pain if you already have an object created to then have to create another and set all the fields.
For arrays, you can do this:
msg.get_list().assign(my_list)
I agree a way to assign a message would be useful though. I'm not sure if set_message(msg) should copy msg, or assign a reference.
set_message(msg)
msg
Maybe implementing CopyFrom on message types would make it more clear.
I'm curious if we could add setters for fields such as arrays and messages, is there any reason you couldn't? Its quite a pain if you already have an object created to then have to create another and set all the fields.