Trait rustdds::dds::traits::serde_adapters::no_key::DeserializerAdapter
source · 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§
sourcefn supported_encodings() -> &'static [RepresentationIdentifier]
fn supported_encodings() -> &'static [RepresentationIdentifier]
Which data representations can the DeserializerAdapter read? See RTPS specification Section 10 and Table 10.3
fn from_bytes( input_bytes: &[u8], encoding: RepresentationIdentifier ) -> Result<D>
Provided Methods§
sourcefn from_vec_bytes(
input_vec_bytes: &[Bytes],
encoding: RepresentationIdentifier
) -> Result<D>
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() .