pub trait DynamicDeserialize<'de>: DynamicType {
type Deserializer: DeserializeSeed<'de, Value = Self> + DynamicType;
// Required method
fn deserializer_for_signature(
signature: &Signature,
) -> Result<Self::Deserializer>;
}
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(
signature: &Signature,
) -> Result<Self::Deserializer>
fn deserializer_for_signature( signature: &Signature, ) -> Result<Self::Deserializer>
Get a deserializer compatible with this parsed signature.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.