heapless icon indicating copy to clipboard operation
heapless copied to clipboard

Allow setting visibility of the pool struct in the `box_pool!` macro

Open zeenix opened this issue 3 months ago • 2 comments

While I think this is a good change, unfortunately it's a breaking change and hence keeping it in draft for now until the next API break (perhaps 1.0).

zeenix avatar Aug 23 '25 12:08 zeenix

Why is it a breaking change?

sgued avatar Aug 24 '25 14:08 sgued

Why is it a breaking change?

Because currently the struct is explicity declared pub by the macro. After this change, the default will not be pub. I thought about making the macro keep the existing behaviour if the caller doesn't specify any visibility but in Rust we don't have a keyword for explicitly marking any API private, so how would the caller ask for the struct to be private? :thinking:

zeenix avatar Aug 24 '25 18:08 zeenix