zvariant

Trait DynamicDeserialize

source
pub trait DynamicDeserialize<'de>: DynamicType {
    type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType;

    // Required method
    fn deserializer_for_signature<S>(signature: S) -> Result<Self::Deserializer>
       where S: TryInto<Signature<'de>>,
             S::Error: Into<Error>;
}
Expand description

Types that deserialize based on dynamic signatures.

Prefer implementing Type and Deserialize if possible, but if the actual signature of your type cannot be determined until runtime, you should implement this type to support deserialization given a signature.

Required Associated Types§

source

type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType

A DeserializeSeed implementation for this type.

Required Methods§

source

fn deserializer_for_signature<S>(signature: S) -> Result<Self::Deserializer>
where S: TryInto<Signature<'de>>, S::Error: Into<Error>,

Get a deserializer compatible with this signature.

Object Safety§

This trait is not object safe.

Implementors§