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> DefaultDecoder<D> for CDRDeserializerAdapter<D>
impl<D> DefaultDecoder<D> for CDRDeserializerAdapter<D>
source§impl<'de, D> DefaultDecoder<D> for CDRDeserializerAdapter<D>where
D: Deserialize<'de>,
impl<'de, D> DefaultDecoder<D> for CDRDeserializerAdapter<D>where
D: Deserialize<'de>,
A default decoder is available for all types that implement
serde::Deserialize
.
source§impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>
impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>
§type DecodedKey = <D as Keyed>::K
type DecodedKey = <D as Keyed>::K
Key type after decoding and before transformation. Read more
source§fn transform_decoded_key(decoded_key: Self::DecodedKey) -> D::K
fn transform_decoded_key(decoded_key: Self::DecodedKey) -> D::K
source§fn key_from_bytes_with<S>(
input_bytes: &[u8],
encoding: RepresentationIdentifier,
decoder: S
) -> Result<D::K, S::Error>
fn key_from_bytes_with<S>( input_bytes: &[u8], encoding: RepresentationIdentifier, decoder: S ) -> Result<D::K, S::Error>
Deserialize data from bytes to an object using the given decoder. Read more
source§fn key_from_bytes(
input_bytes: &[u8],
encoding: RepresentationIdentifier
) -> Result<D::K, Self::Error>where
Self: DefaultDecoder<D>,
fn key_from_bytes(
input_bytes: &[u8],
encoding: RepresentationIdentifier
) -> Result<D::K, Self::Error>where
Self: DefaultDecoder<D>,
Deserialize data from bytes to an object.
encoding
must be something given by supported_encodings()
, or
implementation may fail with Err or panic!()
. Read moresource§impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>
impl<D> DeserializerAdapter<D> for CDRDeserializerAdapter<D>
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
source§fn transform_decoded(decoded: Self::Decoded) -> D
fn transform_decoded(decoded: Self::Decoded) -> D
source§fn from_bytes_with<S>(
input_bytes: &[u8],
encoding: RepresentationIdentifier,
decoder: S
) -> Result<D, S::Error>
fn from_bytes_with<S>( input_bytes: &[u8], encoding: RepresentationIdentifier, decoder: S ) -> Result<D, S::Error>
Deserialize data from bytes to an object using the given decoder. Read more
Auto Trait Implementations§
impl<D> Freeze for CDRDeserializerAdapter<D>
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