Skip to content

der: add Set_of_ref struct#2247

Open
kraemv wants to merge 1 commit intoRustCrypto:masterfrom
kraemv:feature/set_of_ref
Open

der: add Set_of_ref struct#2247
kraemv wants to merge 1 commit intoRustCrypto:masterfrom
kraemv:feature/set_of_ref

Conversation

@kraemv
Copy link

@kraemv kraemv commented Feb 27, 2026

Hello everyone,
in this PR I add a referenced version to the SetOf struct. This can be useful to implement referenced versions of structs containing SetOfs.

In order to allow both decoding from DER bytes and creating references from existing SetOfs, the SetOfRef contains an internal reference that can be both. The inner reference to raw bytes is not pretty, but I do not see another way to implement this with no_std requirements. Most functions like get are then implemented over iterators, that hide the inner reference type. I check sorting on all constructors.

In order for CI to go through, we need a MSRV of 1.87 for the heapless crate.

I am happy to receive feedback on this PR!

@kraemv kraemv force-pushed the feature/set_of_ref branch 2 times, most recently from b38a2cc to fc1d408 Compare February 27, 2026 09:45
@kraemv kraemv force-pushed the feature/set_of_ref branch from fc1d408 to 7aa875a Compare February 27, 2026 10:04
@kraemv kraemv force-pushed the feature/set_of_ref branch from 7aa875a to 43bf173 Compare February 27, 2026 10:21
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.

2 participants