mysql_common::misc::raw::seq

Trait SeqRepr

Source
pub trait SeqRepr {
    type Ctx;

    const MAX_LEN: usize;
    const SIZE: Option<usize>;

    // Required methods
    fn serialize<T: MySerialize>(seq: &[T], buf: &mut Vec<u8>);
    fn deserialize<'de, T>(
        ctx: Self::Ctx,
        buf: &mut ParseBuf<'de>,
    ) -> Result<Cow<'de, [T]>>
       where T: Clone + MyDeserialize<'de, Ctx = ()>;
}
Expand description

Representation of a serialized bytes.

Required Associated Constants§

Source

const MAX_LEN: usize

Maximum number of items in a sequence (depends on how lenght is stored).

Source

const SIZE: Option<usize>

Required Associated Types§

Required Methods§

Source

fn serialize<T: MySerialize>(seq: &[T], buf: &mut Vec<u8>)

Source

fn deserialize<'de, T>( ctx: Self::Ctx, buf: &mut ParseBuf<'de>, ) -> Result<Cow<'de, [T]>>
where T: Clone + MyDeserialize<'de, Ctx = ()>,

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 SeqRepr for LeU32

Source§

const MAX_LEN: usize = 4_294_967_295usize

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

impl SeqRepr for LeU64

Source§

const MAX_LEN: usize = 18_446_744_073_709_551_615usize

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()