Trait rustdds::dds::adapters::with_key::Decode

source ·
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§

source

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.

Implementors§

source§

impl<'de, Dec, DecKey, S, SK> Decode<Dec, DecKey> for CdrDeserializeSeedDecoder<S, SK>
where S: DeserializeSeed<'de, Value = Dec>, SK: DeserializeSeed<'de, Value = DecKey>,