pub trait Decode<Dec, DecKey>: Decode<Dec> {
// Required method
fn decode_key_bytes(
self,
input_key_bytes: &[u8],
encoding: RepresentationIdentifier
) -> Result<DecKey, Self::Error>;
}
Expand description
Decodes a value of type Dec
from a slice of bytes and a
RepresentationIdentifier
. Note that Dec
maps to associated type
Decoded
in DeserializerAdapter
, not D
.
Required Methods§
sourcefn decode_key_bytes(
self,
input_key_bytes: &[u8],
encoding: RepresentationIdentifier
) -> Result<DecKey, Self::Error>
fn decode_key_bytes( self, input_key_bytes: &[u8], encoding: RepresentationIdentifier ) -> Result<DecKey, Self::Error>
Tries to decode the given byte slice to a value of type D
using the
given encoding.