Trait zvariant::DynamicDeserialize
source · [−]pub trait DynamicDeserialize<'de>: DynamicType {
type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType;
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
type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType
type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType
A DeserializeSeed implementation for this type.
Required Methods
fn deserializer_for_signature<S>(signature: S) -> Result<Self::Deserializer> where
S: TryInto<Signature<'de>>,
S::Error: Into<Error>,
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.