Currently it seems the generated accessors are private. Is there a way to generate them with a different visibility, e.g. pub or pub(crate).
I need this because I define my enum in one Module, but need the accessors in another module.
Sample code:
mod mod_a {
#[derive(Hash, Eq, PartialEq, Debug, Clone, Copy, EnumAccess)]
#[enum_access(get(name))]
pub enum Factor {
SingleValue{ name: String },
MultipleValue{ name: String }
}
}
mod mod_b {
use super::mod_a::Factor;
fn my_fn() {
let factor = Factor::SingleValue{ name: "Foo".to_string() };
factor.name(); // error[E0624]: method `name` is private
}
}