pub trait SpecifyCreatableStruct: Sized {
type InnerIteratorType;
type Error;
// Required method
fn create_struct(
seed_iterator: &mut dyn Iterator<Item = NamedField<Self::InnerIteratorType>>,
) -> Result<Self, Self::Error>;
}Expand description
Any type implementing this trait must be convertable from an Iterator over elements of type NamedField<I>, where I is the same type assigned to InnerIteratorType.
Required Associated Types§
Sourcetype InnerIteratorType
type InnerIteratorType
The type contained in NamedField
Required Methods§
Sourcefn create_struct(
seed_iterator: &mut dyn Iterator<Item = NamedField<Self::InnerIteratorType>>,
) -> Result<Self, Self::Error>
fn create_struct( seed_iterator: &mut dyn Iterator<Item = NamedField<Self::InnerIteratorType>>, ) -> Result<Self, Self::Error>
The function that should be called to attempt a conversion from an Iterator to the type implementing this trait.
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.