e.g. I have
#[derive(knuffel::Decode)]
pub struct Config {
#[knuffel(children(name = "replace"))]
pub replace: Vec<ReplaceRegex>,
#[knuffel(children(name = "job"))]
pub jobs: Vec<Job>,
}
It turns out that a lot of replace rules end up being used in practice, and I'd like to allow the use of r as a shorthand. With current knuffel, I'd have to do this as a separate field. I would instead like to do something like the following:
#[derive(knuffel::Decode)]
pub struct Config {
#[knuffel(children(name = "replace", name = "r"))]
pub replace: Vec<ReplaceRegex>,
#[knuffel(children(name = "job"))]
pub jobs: Vec<Job>,
}
and both replace and r children will go into self.replace.
e.g. I have
It turns out that a lot of
replacerules end up being used in practice, and I'd like to allow the use ofras a shorthand. With current knuffel, I'd have to do this as a separate field. I would instead like to do something like the following:and both
replaceandrchildren will go intoself.replace.