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

Think hard about how to handle CHOICE #19

Closed
alex opened this issue Oct 3, 2015 · 4 comments
Closed

Think hard about how to handle CHOICE #19

alex opened this issue Oct 3, 2015 · 4 comments

Comments

@alex
Copy link
Owner

alex commented Oct 3, 2015

No description provided.

@alex
Copy link
Owner Author

alex commented Nov 11, 2015

Fundamentally the only possible API here is:

  • Peek at tag
  • give that to callback, let it do stuff

Implementation is straightforward pending figuring out implicit/explicit tagging

@alex
Copy link
Owner Author

alex commented Jul 29, 2019

I think you can basically treat a choice as a sequence of optionals (possibyl with explicit/implicit tags) where at least one must have a value.

@alex
Copy link
Owner Author

alex commented Aug 22, 2019

Ok, better plan:

enum Choice2<T1: Asn1Element, T2: Asn1Element> {
    Element1(T1::Output),
    Element2(T2::Output),
}

we can generate 2-5 of these or so.

@alex
Copy link
Owner Author

alex commented Aug 23, 2019

This worked out easily enough, solved in #54

@alex alex closed this as completed Aug 23, 2019
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

No branches or pull requests

1 participant