pub trait SeedFactory<'de, T> {
type Value;
type Seed: DeserializeSeed<'de, Value = Self::Value>;
// Required method
fn seed<E>(self, tag: T) -> Result<Self::Seed, E>
where E: Error;
}
Expand description
A factory that creates a DeserializeSeed
implementation based on a given
tag.
Convenience implementations of this trait are provided for the standard map
types with &'static str
and String
as key, as well as
WithoutTag
and WithTag
.
Required Associated Types§
Sourcetype Seed: DeserializeSeed<'de, Value = Self::Value>
type Seed: DeserializeSeed<'de, Value = Self::Value>
The type of the DeserializeSeed
implementation that will be returned
by this factory.
Required Methods§
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.