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
Associated Constants
Required methods
fn deserialize(ctx: Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>
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.
Implementations on Foreign Types
This ad-hock impl parses length-encoded string into a SmallVec
.
Implementors
impl<'de, T, U> MyDeserialize<'de> for Either<T, U> where
T: MyDeserialize<'de>,
U: MyDeserialize<'de>,
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,
impl<'de, T, U> MyDeserialize<'de> for Seq<'de, T, U> where
T: Clone + MyDeserialize<'de, Ctx = ()>,
U: SeqRepr,
impl<'de, T, const LEN: usize> MyDeserialize<'de> for ConstBytes<T, LEN> where
T: Default,
T: ConstBytesValue<LEN>,
impl<'de, T, const N: u8> MyDeserialize<'de> for ConstU8<T, N> where
T: Error + Send + Sync + 'static,
T: Default,
impl<'de, T, const N: u32> MyDeserialize<'de> for ConstU32<T, N> where
T: Error + Send + Sync + 'static,
T: Default,
impl<'de, T: Bitflags, U> MyDeserialize<'de> for RawFlags<T, U> where
U: IntRepr<Primitive = T::Repr>,