mysql_common::proto

Trait 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 Constants§

Source

const SIZE: Option<usize>

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

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 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.

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<'de> MyDeserialize<'de> for &'de [u8]

Source§

const SIZE: Option<usize> = None

Source§

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> = _

Source§

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

Source§

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> = _

Source§

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

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = RowsEventCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = u16

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

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

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = BinlogCtx<'de>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

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

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

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

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = (u16, bool)

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = Arc<[Column]>

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

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

Source§

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

Source§

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

Source§

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§

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

Source§

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

Source§

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

Source§

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

Source§

const SIZE: Option<usize> = None

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

type Ctx = <T as BytesRepr>::Ctx

Source§

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

Source§

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

Source§

type Ctx = ()

Source§

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

Source§

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

Source§

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

Source§

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§

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