Skip to main content

Deserialize

Trait Deserialize 

Source
pub trait Deserialize<'de, C: Config>: SchemaRead<'de, C> {
    // Provided methods
    fn deserialize(src: &'de [u8], config: C) -> ReadResult<Self::Dst> { ... }
    fn deserialize_into(
        src: &'de [u8],
        dst: &mut MaybeUninit<Self::Dst>,
        config: C,
    ) -> ReadResult<()> { ... }
}
Expand description

Like crate::Deserialize, but allows the caller to provide a custom configuration.

Provided Methods§

Source

fn deserialize(src: &'de [u8], config: C) -> ReadResult<Self::Dst>

Deserialize the input bytes into a new Self::Dst.

Source

fn deserialize_into( src: &'de [u8], dst: &mut MaybeUninit<Self::Dst>, config: C, ) -> ReadResult<()>

Deserialize the input bytes into dst.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'de, T, C: Config> Deserialize<'de, C> for T
where T: SchemaRead<'de, C>,