Open
Description
derive(Choice)
needs constructed = "true"
flag,
but derive(Sequence)
does not.
#[derive(Choice)]
pub enum ImplicitChoice<'a> {
// This works:
#[asn1(context_specific = "3", tag_mode = "IMPLICIT", constructed = "true")]
SequenceOfNulls(SequenceOf<Null, 1>),
// This won't decode:
#[asn1(context_specific = "3", tag_mode = "IMPLICIT")]
SequenceOfNulls(SequenceOf<Null, 1>),
}
I mean, the Choice macro is clueless about the underlaying type.
Something like this is possible:
let tag: Tag = Tag::Utf8String;
match tag {
String::TAG => {}
Null::TAG => {}
SequenceOf::<Null, 1>::TAG => {}
// .. more choices
}
Metadata
Metadata
Assignees
Labels
No labels