pub trait Deserialize: DataType {
    fn deserialize(
        cursor: &mut ReadCursor<'_>
    ) -> Result<Self, DeserializeError>; fn deserialize_zero_copy(cursor: &mut ReadCursor<'_>) -> Self
    where
        Self: AsBytes + FromBytes
, { ... } fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError> { ... } }
Expand description

Trait for types that can be deserialized from UAVCAN transfers

Required methods

Deserializes a value and returns it

Provided methods

Deserializes a value from a slice of bytes and returns it

This is available only for types that implement Sized, [AsBytes], and [FromBytes].

Panics

This function panics if the provided cursor is not aligned to a byte boundary.

A convenience function that creates a cursor around the provided bytes and calls deserialize

Implementations on Foreign Types

source

impl Deserialize for Entry

Implementors