Trait zvariant::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§
sourcetype Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType
type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType
A DeserializeSeed implementation for this type.
Required Methods§
sourcefn deserializer_for_signature<S>(signature: S) -> Result<Self::Deserializer>
fn deserializer_for_signature<S>(signature: S) -> Result<Self::Deserializer>
Get a deserializer compatible with this signature.
Object Safety§
This trait is not object safe.