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

    const SIZE: Option<usize>;

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

Deserialization for various MySql types.

Required Associated Types§

source

type Ctx

Some structs defines deserialization in the context of another value.

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

Required Associated Constants§

source

const SIZE: Option<usize>

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

Required Methods§

source

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

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'de> MyDeserialize<'de> for &'de [u8]

source§

const SIZE: Option<usize> = None

§

type Ctx = usize

source§

fn deserialize(len: Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>

source§

impl<'de> MyDeserialize<'de> for f64

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

fn deserialize((): Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>

source§

impl<'de, const LEN: usize> MyDeserialize<'de> for SmallVec<[u8; LEN]>
where [u8; LEN]: Array<Item = u8>,

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

fn deserialize((): Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>

source§

impl<'de, const LEN: usize> MyDeserialize<'de> for [u8; LEN]

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

fn deserialize((): Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>

Implementors§

source§

impl<'de> MyDeserialize<'de> for Value<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for BinlogValue<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = (ColumnType, &'de [u8], bool, bool)

source§

impl<'de> MyDeserialize<'de> for AuthPlugin<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ErrPacket<'de>

source§

impl<'de> MyDeserialize<'de> for SessionStateChange<'de>

source§

impl<'de> MyDeserialize<'de> for AnonymousGtidEvent

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = GtidEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for BeginLoadQueryEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for BinlogEventHeader

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ColumnCharsets<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ColumnName<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ColumnNames<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for DefaultCharset<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for DeleteRowsEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for DeleteRowsEventV1<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for EnumStrValue<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for EnumStrValues<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for EnumsStrValues<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ExecuteLoadQueryEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for FormatDescriptionEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for GeometryTypes<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for GtidEvent

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for IncidentEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for IntvarEvent

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = _

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for NonDefaultCharset

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for PartialUpdateRowsEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for PrimaryKeyWithPrefix

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for PrimaryKeysWithPrefix<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for QueryEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for RandEvent

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = _

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for RotateEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for RowsEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = RowsEventCtx<'de>

source§

impl<'de> MyDeserialize<'de> for RowsQueryEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for SetStrValue<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SetStrValues<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SetsStrValues<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SimplePrimaryKey<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for StatusVars<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = u16

source§

impl<'de> MyDeserialize<'de> for TableMapEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for TransactionPayloadEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for UpdateRowsEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for UpdateRowsEventV1<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for UserVarEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for WriteRowsEvent<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for WriteRowsEventV1<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = RowsEvent::SIZE

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for XidEvent

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

impl<'de> MyDeserialize<'de> for JsonbString<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for JsonDiff<'de>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for BinlogRow

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = (u64, &'de BitSlice<u8>, bool, &'de TableMapEvent<'de>)

source§

impl<'de> MyDeserialize<'de> for ParseBuf<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = usize

source§

impl<'de> MyDeserialize<'de> for PublicKeyRequest

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for Gtids<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for Schema<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SystemVariable<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for TransactionCharacteristics<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for TransactionState<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for Unsupported<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for AuthMoreData<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for AuthSwitchRequest<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for Column

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ComBinlogDump<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ComBinlogDumpGtid<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ComChangeUser<'de>

source§

impl<'de> MyDeserialize<'de> for ComChangeUserMoreData<'de>

source§

impl<'de> MyDeserialize<'de> for ComRegisterSlave<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ComTableDump<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for GnoInterval

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for HandshakePacket<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for HandshakeResponse<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for LocalInfilePacket<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for OldAuthSwitchRequest

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ProgressReport<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for PublicKeyResponse<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SemiSyncAckPacket<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ServerError<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = (u16, bool)

source§

impl<'de> MyDeserialize<'de> for SessionStateInfo<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for Sid<'de>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SqlState

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for SslRequest

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for StmtPacket

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de> MyDeserialize<'de> for ValueDeserializer<BinValue>

source§

impl<'de> MyDeserialize<'de> for ValueDeserializer<TextValue>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de, S: SerializationSide> MyDeserialize<'de> for RowDeserializer<S, Binary>

source§

const SIZE: Option<usize> = None

§

type Ctx = Arc<[Column]>

source§

impl<'de, T> MyDeserialize<'de> for RowDeserializer<T, Text>

source§

const SIZE: Option<usize> = None

§

type Ctx = Arc<[Column]>

source§

impl<'de, T, U> MyDeserialize<'de> for Either<T, U>
where T: MyDeserialize<'de>, U: MyDeserialize<'de>,

source§

const SIZE: Option<usize> = None

§

type Ctx = Either<<T as MyDeserialize<'de>>::Ctx, <U as MyDeserialize<'de>>::Ctx>

source§

impl<'de, T, U> MyDeserialize<'de> for Const<T, U>
where U: IntRepr, T: TryFrom<U::Primitive>, <T as TryFrom<U::Primitive>>::Error: Error + Send + Sync + 'static,

source§

const SIZE: Option<usize> = U::SIZE

§

type Ctx = ()

source§

impl<'de, T, U> MyDeserialize<'de> for Seq<'de, T, U>
where T: Clone + MyDeserialize<'de, Ctx = ()>, U: SeqRepr,

source§

const SIZE: Option<usize> = None

§

type Ctx = <U as SeqRepr>::Ctx

source§

impl<'de, T, const LEN: usize> MyDeserialize<'de> for ConstBytes<T, LEN>
where T: Default + ConstBytesValue<LEN>,

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de, T, const N: u8> MyDeserialize<'de> for ConstU8<T, N>
where T: Error + Send + Sync + 'static + Default,

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de, T, const N: u32> MyDeserialize<'de> for ConstU32<T, N>
where T: Error + Send + Sync + 'static + Default,

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de, T: StorageFormat, U: ComplexType> MyDeserialize<'de> for ComplexValue<'de, T, U>

Available on crate feature binlog only.
source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

impl<'de, T: BytesRepr> MyDeserialize<'de> for RawBytes<'de, T>

source§

const SIZE: Option<usize> = T::SIZE

§

type Ctx = <T as BytesRepr>::Ctx

source§

impl<'de, T: IntRepr> MyDeserialize<'de> for RawInt<T>

source§

const SIZE: Option<usize> = T::SIZE

§

type Ctx = ()

source§

impl<'de, T: IntRepr<Primitive = u8>, U> MyDeserialize<'de> for RawSeq<'de, T, U>

source§

const SIZE: Option<usize> = None

§

type Ctx = usize

source§

impl<'de, T: IntRepr, U> MyDeserialize<'de> for RawConst<T, U>

source§

const SIZE: Option<usize> = T::SIZE

§

type Ctx = ()

source§

impl<'de, T: OkPacketKind> MyDeserialize<'de> for OkPacketDeserializer<'de, T>

source§

impl<'de, T: SerializationSide> MyDeserialize<'de> for NullBitmap<T, Cow<'de, [u8]>>

source§

const SIZE: Option<usize> = None

§

type Ctx = usize

source§

impl<'de, T: Flags, U> MyDeserialize<'de> for RawFlags<T, U>
where U: IntRepr<Primitive = T::Bits>,

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

impl<'de, const LEN: usize> MyDeserialize<'de> for Skip<LEN>

source§

const SIZE: Option<usize> = _

§

type Ctx = ()