Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concatenate! macro cannot expand to public type #19

Closed
graelo opened this issue Sep 24, 2021 · 3 comments · Fixed by #28
Closed

concatenate! macro cannot expand to public type #19

graelo opened this issue Sep 24, 2021 · 3 comments · Fixed by #28

Comments

@graelo
Copy link

graelo commented Sep 24, 2021

Hi,

I'd like to use concatenate!() and obtain a a public type, but I could not find a way.
Do you envision a simple way to do this?

Thanks

@vks
Copy link
Owner

vks commented Jul 4, 2023

The easiest workaround would be to use the newtype pattern to define a public type:

concatenate!(PrivateEstimator, ...);
pub struct PublicEstimator(PrivateEstimator);

However, this will result in quite a bit of boilerplate code. I'll consider extending concatenate! to support creating a public type.

Sorry for the late reply!

@jellythefish
Copy link

@vks hey! Would be great to have this feature as well =)
It seems like @hatoo's pr #28 do the right thing. Could you please check?

@vks vks closed this as completed in #28 Apr 26, 2024
@vks
Copy link
Owner

vks commented Apr 26, 2024

I just published version 0.15.1, which includes this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants