pub trait Produce: Sized + ToSpan {
type Prod: Production;
// Required method
fn produce(
parser: &mut Parser<'_, <Self::Prod as Production>::L>,
meta: &Metadata<<Self::Prod as Production>::L>,
) -> Result<Self, <Self::Prod as Production>::L>;
// Provided method
fn prod_id() -> TypeId { ... }
}Required Associated Types§
type Prod: Production
Required Methods§
fn produce( parser: &mut Parser<'_, <Self::Prod as Production>::L>, meta: &Metadata<<Self::Prod as Production>::L>, ) -> Result<Self, <Self::Prod as Production>::L>
Provided 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.