I would like to update fields such as manifests and annotations, for example by appending elements to them.
For a specific example, I have the following function that adds a manifest to the image index. I have to first clone the entire manifests vector, add an element to it and then use set_manifests to set the manifests vector to the new value.
From what I can tell, if we derived MutGetters on the structures and then use #[getset(get_mut)] on the fields, then I would be able to get a mutable reference to these fields and update them accordingly. I'm planning on opening a PR, I just wanted to make sure there are no objections to this change and check if I missed some other way of achieving this.
I would like to update fields such as manifests and annotations, for example by appending elements to them.
For a specific example, I have the following function that adds a manifest to the image index. I have to first clone the entire
manifests
vector, add an element to it and then useset_manifests
to set themanifests
vector to the new value.From what I can tell, if we derived
MutGetters
on the structures and then use#[getset(get_mut)]
on the fields, then I would be able to get a mutable reference to these fields and update them accordingly. I'm planning on opening a PR, I just wanted to make sure there are no objections to this change and check if I missed some other way of achieving this.