pub trait DeserializerAdapter<D>where
    D: DeserializeOwned,{
    // Required methods
    fn supported_encodings() -> &'static [RepresentationIdentifier];
    fn from_bytes(
        input_bytes: &[u8],
        encoding: RepresentationIdentifier
    ) -> Result<D>;

    // Provided method
    fn from_vec_bytes(
        input_vec_bytes: &[Bytes],
        encoding: RepresentationIdentifier
    ) -> Result<D> { ... }
}
Expand description

trait for connecting Serde Deserializer implementation and DataReader together - no_key version.

Required Methods§

source

fn supported_encodings() -> &'static [RepresentationIdentifier]

Which data representations can the DeserializerAdapter read? See RTPS specification Section 10 and Table 10.3

source

fn from_bytes( input_bytes: &[u8], encoding: RepresentationIdentifier ) -> Result<D>

Provided Methods§

source

fn from_vec_bytes( input_vec_bytes: &[Bytes], encoding: RepresentationIdentifier ) -> Result<D>

This method has a default implementation, but the default will make a copy of all the input data in memory and then call from_bytes() .

Implementors§