Skip to main content

ParamType

Trait ParamType 

Source
pub trait ParamType {
    // Required methods
    fn from_bytes(data: &[u8]) -> Result<Self, CommandError>
       where Self: Sized;
    fn to_bytes(&self) -> Vec<u8> ;
    fn data_as_string(&self) -> String;
}

Required Methods§

Source

fn from_bytes(data: &[u8]) -> Result<Self, CommandError>
where Self: Sized,

Source

fn to_bytes(&self) -> Vec<u8>

Source

fn data_as_string(&self) -> String

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ParamType for f32

Source§

impl ParamType for i8

Source§

impl ParamType for i16

Source§

impl ParamType for i32

Source§

impl ParamType for i64

Source§

impl ParamType for u8

Source§

impl ParamType for String

Source§

impl<T: ParamType> ParamType for Vec<T>

Implementors§