You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implicit name generation is something that is very dangerous, and we should almost always use hygienic, correctly scoped macros. So instead of making CheeseVec for the following:
#[derive(StructOfArray)]
struct Cheese {
...
}
I instead want to specify the resulting SOA name explicitly:
So I agree that having an option to specify the generated structs names would be nice. I don't have a lot of time, but I would welcome a PR implementing it.
Syntax wise, I don't think it is possible to use a proc-macro like this
However, as of today, the proc macro generate 7 structs from Cheese: CheeseVec, CheeseRef, CheeseMut, CheeseSlice, CheeseSliceMut, CheesePtr and CheesePtrMut. So either the could would need all of them to be configurable, or have some kind of prefix to use.
Implicit name generation is something that is very dangerous, and we should almost always use hygienic, correctly scoped macros. So instead of making
CheeseVec
for the following:I instead want to specify the resulting SOA name explicitly:
The text was updated successfully, but these errors were encountered: