Description
Not sure if this is "easy" to implement, tried looking at the code and it looks to be limited to 1 "item".
But will ask nevertheless in case I'm wrong:)
So say you got:
pub struct Foo {
alpha: u32,
bar: u32,
beta: u32,
gamma: u32,
}
It would be nice if you could have the action generate getter/setter
for all fields and/or multiple fields,
perhaps selected in the editor, though it feels a bit hacky as they might not be in order.
So if you did generate getter/setter for all fields
it would end up with asking you the: generate a X method
,
and if we chose generate a getter method
it would end up as:
pub struct Foo {
alpha: u32,
bar: u32,
beta: u32,
gamma: u32,
}
impl Foo {
pub fn alpha(&self) -> u32 {
self.alpha
}
pub fn bar(&self) -> u32 {
self.bar
}
pub fn beta(&self) -> u32 {
self.beta
}
pub fn gamma(&self) -> u32 {
self.gamma
}
}
It's just a "simple" convenience and i completely understand it's uses are small so I'm pushing hard for it just a simple request:)
Thanks everyone contributing to this project, all your work is very much appreciated!