Trait minint::datatype::DataWrap

source ·
pub trait DataWrap: Sized + Debug {
    const MSGPCK: u8;
    const STRING: &'static str;

    // Required methods
    fn decode<R: RmpRead>(rd: &mut R) -> Result<Self, ()>;
    fn encode<W: RmpWrite>(wr: &mut W, val: Self) -> Result<(), ()>;
}

Required Associated Constants§

source

const MSGPCK: u8

source

const STRING: &'static str

Required Methods§

source

fn decode<R: RmpRead>(rd: &mut R) -> Result<Self, ()>

source

fn encode<W: RmpWrite>(wr: &mut W, val: Self) -> Result<(), ()>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: DataType + Debug> DataWrap for Vec<T>

source§

const MSGPCK: u8 = T::ARRAYDATATYPE_MSGPCK

source§

const STRING: &'static str = T::ARRAYDATATYPE_STRING

source§

fn decode<R: RmpRead>(rd: &mut R) -> Result<Self, ()>

source§

fn encode<W: RmpWrite>(wr: &mut W, val: Self) -> Result<(), ()>

Implementors§

source§

impl<T: DataType + Debug> DataWrap for T

source§

const MSGPCK: u8 = Self::DATATYPE_MSGPCK

source§

const STRING: &'static str = Self::DATATYPE_STRING