Struct rustdds::CDRDeserializerAdapter
source · pub struct CDRDeserializerAdapter<D> { /* private fields */ }
Expand description
This type adapts CdrDeserializer (which implements serde::Deserializer) to
work as a with_key::DeserializerAdapter
and
no_key::DeserializerAdapter
.
CdrDeserializer cannot directly implement the trait itself, because CdrDeserializer has the type parameter BO open, and the adapter needs to be bi-endian.
Trait Implementations§
source§impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>where
D: DeserializeOwned,
impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>where D: DeserializeOwned,
source§fn 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, Error>
source§fn from_vec_bytes(
input_vec_bytes: &[Bytes],
encoding: RepresentationIdentifier
) -> Result<D, Error>
fn from_vec_bytes( input_vec_bytes: &[Bytes], encoding: RepresentationIdentifier ) -> Result<D, Error>
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() .
source§impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>where
D: Keyed + DeserializeOwned,
<D as Keyed>::K: DeserializeOwned,
impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>where D: Keyed + DeserializeOwned, <D as Keyed>::K: DeserializeOwned,
fn key_from_bytes( input_bytes: &[u8], encoding: RepresentationIdentifier ) -> Result<D::K, Error>
Auto Trait Implementations§
impl<D> RefUnwindSafe for CDRDeserializerAdapter<D>where D: RefUnwindSafe,
impl<D> Send for CDRDeserializerAdapter<D>where D: Send,
impl<D> Sync for CDRDeserializerAdapter<D>where D: Sync,
impl<D> Unpin for CDRDeserializerAdapter<D>where D: Unpin,
impl<D> UnwindSafe for CDRDeserializerAdapter<D>where D: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more