Trait mysql_common::proto::MyDeserialize

source ·
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>

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = _

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = _

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = RowsEventCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = u16

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

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

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = BinlogCtx<'de>

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

source§

const SIZE: Option<usize> = None

§

type Ctx = ()

source§

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

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: Flags, U> MyDeserialize<'de> for RawFlags<T, U>
where U: IntRepr<Primitive = T::Bits>,

source§

const SIZE: Option<usize> = _

§

type Ctx = ()

source§

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

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, const LEN: usize> MyDeserialize<'de> for Skip<LEN>

source§

const SIZE: Option<usize> = _

§

type Ctx = ()