Trait WireCodec

Source
pub trait WireCodec {
    type Frames;
    type IncomingFrame: IntoIterator<Item = u8> + AsRef<[u8]>;

    const MESSAGE_DELIMITER: Option<char>;

    // Required methods
    fn get_frames(data: &[u8]) -> Result<Self::Frames, CodecError>;
    fn decode_frame(
        data: &[u8],
    ) -> Result<(Self::IncomingFrame, usize), CodecError>;
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl WireCodec for Bgx13Codec

Source§

const MESSAGE_DELIMITER: Option<char> = None

Source§

type Frames = Vec<Vec<u8, MAX_BGX13_MESSAGE_LENGTH>, MAX_BGX13_FRAMES_COUNT>

Source§

type IncomingFrame = Vec<u8, MAX_BGX13_MESSAGE_LENGTH>

Source§

impl WireCodec for Bt4502Codec

Source§

const MESSAGE_DELIMITER: Option<char> = None

Source§

type Frames = Vec<Vec<u8, MAX_BT4502_MESSAGE_LENGTH>, MAX_BT4502_FRAMES_COUNT>

Source§

type IncomingFrame = Vec<u8, MAX_BT4502_MESSAGE_LENGTH>

Source§

impl WireCodec for Rn4870Codec

Source§

const MESSAGE_DELIMITER: Option<char>

Source§

type Frames = Vec<Vec<u8, MAX_BLE_FRAME_LENGTH>, MAX_BLE_FRAMES_COUNT>

Source§

type IncomingFrame = Vec<u8, MAX_BLE_FRAME_LENGTH>

Source§

impl WireCodec for UsbCodec

Source§

const MESSAGE_DELIMITER: Option<char> = None

Source§

type Frames = Vec<Vec<u8, MAX_USB_FRAME_LENGTH>, MAX_USB_FRAMES_COUNT>

Source§

type IncomingFrame = Vec<u8, MAX_USB_FRAME_LENGTH>