Trait mysql_common::proto::MyDeserialize[][src]

pub trait MyDeserialize<'de>: Sized {
    type Ctx;

    const SIZE: Option<usize>;

    fn deserialize(ctx: Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>;
}
Expand description

Deserialization for various MySql types.

Associated Types

Some structs defines deserialization in the context of another value.

Use () here if the deserialization procedure is defined without premises.

Associated Constants

Size hint of a serialized value (in bytes), if it’s constant.

Required methods

Deserializes self from the given buf.

Imlementation must consume corresponding amount of bytes from the buf.

Panic

Implementation must panic on insufficient buffer length if Self::SIZE.is_some(). One should use ParseBuf::checked_parse for checked deserialization.

Implementations on Foreign Types

This ad-hock impl parses length-encoded string into a SmallVec.

Implementors