Skip to content

der: add DecodeValueExt trait with fn from_der_value #1936

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

@dishmaker dishmaker commented Jul 10, 2025

Motivation: I didn't know about

AnyRef::new(tag, value)?.decode_as::<Self>()

trick, when writing https://github.com/RustCrypto/crypto-bigint/pull/851/files#diff-87fe87bbce5380197d3c659465e30daf47af5cac570bb4058f467a5b2dffa0b2R164

@tarcieri
Copy link
Member

I'm not sure the solution is a trait method exposed everywhere

@dishmaker dishmaker force-pushed the dishmaker/der_from_der_value branch from 87100ff to 6f03ef8 Compare July 11, 2025 12:54
@dishmaker dishmaker changed the title der: add fn DecodeValue::from_der_value der: add DecodeValueExt trait with fn from_der_value Jul 11, 2025
@carloskiki
Copy link

I don't like the introduction of a trait to solve this very niche ergonomic issue.

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.

3 participants