Skip to content

der: add ApplicationExplicit, ContextSpecificExplicit, PrivateExplicit #1945

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dishmaker
Copy link
Contributor

Partially fixes

Derive macro support in future PR.

@dishmaker
Copy link
Contributor Author

dishmaker commented Jul 18, 2025

This partially fixes #1808, because we can rewrite derive(Choice) as:

match tag {
    String::TAG => {}
    // ContextSpecificExplicit knows it's constructed, without trickery
    ContextSpecificExplicit::<2, BitString>::TAG => {}
    // .. more choices
}

@tarcieri
Copy link
Member

I'm getting a little worried about the internal_macros module. It's a lot of macros. Perhaps there are some non-macro-based abstractions to explore there.

@dishmaker
Copy link
Contributor Author

So my plan is to make this PR pure generic *Explicit.

CustomTagExplicit<TAG, T, CLASS>

Meanwhile, macro code will stay the same and will be eventually deprecated (because of trait flaws).

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 this pull request may close these issues.

2 participants