Way to declare SET #38
Answered
by
XAMPPRocky
naveedpash
asked this question in
Q&A
-
Hey, If I have the following ASN.1 Mode-selector ::= SET { mode-value [0] IMPLICIT INTEGER { x410-1984-mode (0), normal-mode (1) } } how do I code this in rust? is below an adequate example? #[derive(Debug, AsnType, Encode, Decode)]
#[rasn(tag(universal, 17))]
pub struct ModeSelector {
#[rasn(tag(0))]
mode_value: u8
} |
Beta Was this translation helpful? Give feedback.
Answered by
XAMPPRocky
Sep 15, 2021
Replies: 1 comment 1 reply
-
Thank you for your question! I have not written the documentation for #[derive(Debug, AsnType, Encode, Decode)]
#[rasn(tag(universal, 17))]
#[rasn(set)]
pub struct ModeSelector {
#[rasn(tag(0))]
mode_value: u8
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
naveedpash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for your question! I have not written the documentation for
SET
types yet, as I haven't released it yet. But how you do it is very simple, you just add#[rasn(set)]
to the container like#[rasn(choice)]
.