mysql_common::misc::raw::int

Trait IntRepr

Source
pub trait IntRepr {
    type Primitive: Debug + Default + Copy + Eq + Ord + Hash;

    const SIZE: Option<usize>;

    // Required methods
    fn serialize(val: Self::Primitive, buf: &mut Vec<u8>);
    fn deserialize(buf: &mut ParseBuf<'_>) -> Result<Self::Primitive>;
}
Expand description

Serialized representation of an integer.

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn serialize(val: Self::Primitive, buf: &mut Vec<u8>)

Source

fn deserialize(buf: &mut ParseBuf<'_>) -> Result<Self::Primitive>

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.

Implementations on Foreign Types§

Source§

impl IntRepr for i8

Source§

const SIZE: Option<usize> = _

Source§

type Primitive = i8

Source§

fn serialize(val: Self::Primitive, buf: &mut Vec<u8>)

Source§

fn deserialize(buf: &mut ParseBuf<'_>) -> Result<Self::Primitive>

Source§

impl IntRepr for u8

Source§

const SIZE: Option<usize> = _

Source§

type Primitive = u8

Source§

fn serialize(val: Self::Primitive, buf: &mut Vec<u8>)

Source§

fn deserialize(buf: &mut ParseBuf<'_>) -> Result<Self::Primitive>

Implementors§