It would be useful to implement AsRef<DecodingKey> for DecodingKey. And as a follow up maybe even allow decode to take an impl AsRef<DecodingKey>.
From AsRef#reflexivity:
Ideally, AsRef would be reflexive, i.e. there would be an impl<T: ?Sized> AsRef<T> for T with as_ref simply returning its argument unchanged. Such a blanket implementation is currently not provided due to technical restrictions of Rust’s type system (it would be overlapping with another existing blanket implementation for &T where T: AsRef<U> [...])
Would happily work on a PR, if desired.
It would be useful to implement
AsRef<DecodingKey>forDecodingKey. And as a follow up maybe even allowdecodeto take animpl AsRef<DecodingKey>.From
AsRef#reflexivity:Would happily work on a PR, if desired.