Skip to content

der: add AnyCustomClassExplicit/AnyCustomClassImplicit#1747

Closed
dishmaker wants to merge 1 commit intoRustCrypto:masterfrom
dishmaker:dishmaker/any_custom_class
Closed

der: add AnyCustomClassExplicit/AnyCustomClassImplicit#1747
dishmaker wants to merge 1 commit intoRustCrypto:masterfrom
dishmaker:dishmaker/any_custom_class

Conversation

@dishmaker
Copy link
Copy Markdown
Contributor

Potential fix for:

Not the best solution, but a proof-of-concept of internal API that ContextSpecific wrapper would use.

@dishmaker dishmaker marked this pull request as draft March 28, 2025 15:08
fn tag(&self) -> Tag {
self.tag_number
.custom_class(self.class, self.constructed)
.expect("class not to be Universal")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to get rid of this unwrap/expect


impl<'a, T> AnyCustomClassImplicit<T>
where
T: Tagged + DecodeValue<'a> + 'a,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO replace with IsConstructed from another PR


impl<T> EncodeValue for AnyCustomClassExplicit<T>
where
T: EncodeValue + Tagged,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO maybe T: Encode

@dishmaker dishmaker closed this May 7, 2025
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.

1 participant