jamsocket / aper

A Rust data structure library built on state machines.
https://aper.dev
MIT License
299 stars 12 forks source link

make generated transforms always public #23

Closed joonazan closed 3 years ago

joonazan commented 3 years ago

This makes the macro usable with public structs. #22

Probably it would be better to make the generated transform public only when the struct is public? I don't know how to cleanly put a conditional pub into the metaprogramming. I will learn how to if you agree that that is how it should be.

paulgb commented 3 years ago

Thanks Joonatan,

I'm not sure how to condition on pub either. I agree that it seems like the right thing to do to condition on whether the struct being derived is public. I'll have a look as well.

paulgb commented 3 years ago

I had a go at this in #24, could you let me know if that approach solves the problem you originally encountered?

joonazan commented 3 years ago

@paulgb My project compiles with your branch "joonazan-main". Thank you!