Trait at_commands::SerDe

source ·
pub trait SerDe: Sized {
    // Required methods
    fn serialize<W: Write>(
        sink: &mut W,
        values: &[Self]
    ) -> Result<(), SerializeError<Self>>;
    fn deserialize<R: Read>(
        source: &mut R,
        existing_bytes: DeserializeBytes
    ) -> DeserializeResult<Self>;
}
Expand description

A trait for serializing or deserializing multiple items at once and defragmenting partially serialized items when new bytes become available.

Required Methods§

source

fn serialize<W: Write>( sink: &mut W, values: &[Self] ) -> Result<(), SerializeError<Self>>

source

fn deserialize<R: Read>( source: &mut R, existing_bytes: DeserializeBytes ) -> DeserializeResult<Self>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: SerDeOne + Clone> SerDe for T

Blanket implementation for types that implement SerDe and which break bytestreams on newlines when deserializing. This is just used for AT commands and responses.