Closed sourcefrog closed 9 months ago
Hi, TransparentKeyBuilder
only supports types which implement TransparentKey
trait, if you want to use it, you must implement TransparentKey
for your key type first.
I think the problem I hit was connected to this:
https://github.com/al8n/stretto/blob/cccb12b14fc612a5e8f2ac595e04c995036d4212/src/lib.rs#L457-L461
I tried implementing TransparentKey
, but the problem is that the derive(Default)
implies that my key type K
must also implement Default
. I feel like for many keys, at least for my key, there is no very meaningful defaulti
I tried to make a small repro, but it seems to work OK when the key type is !Default. Perhaps I was just confused.
This looks nice!
I'm trying this code:
However, it complains that my key type doesn't implement
Default
, which it doesn't, and I don't really want to since there is no sensible defaultIt doesn't seem inherently necessary that the key has a default? Could we just add a
new
method?