-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Description
Hi there! I'm new to the RustCrypto libraries, so if I'm holding them wrong and there's a smooth way to go from one to the other, please point it out 😅
I'm trying to build an x509_cert::attr::Attribute
by hand using constants. What I'd like to do is something like this:
let attr = Attribute {
oid: SPC_LINK,
values: SetOfVec::from_iter(
[BitString::from_bytes(&[0x00]).unwrap().into()] // .into() here converts BitString to Any
).unwrap(),
};
Is there a reason why we don't have implementations such as From<BitStringRef<'a>> for AnyRef<'a>
? If it's just a case of "no one has needed it yet", would you accept a PR for such things?
And on a similar note, could the derive macros also potentially implement Any
conversion also? I guess you might struggle to distinguish between owned and borrowed structs to know which to implement (or how)
Metadata
Metadata
Assignees
Labels
No labels