Open notdanilo opened 11 months ago
Rename Parser to Transformer and implement Parser as a specialization of Transformer where the Input is a string.
Parser
Transformer
Input
trait Transformer<Input> { type Output; fn transform(&self, input: Input) -> Result<Self::Output>; } trait Parser<T>: Transformer<&str, Output = T> { fn parse(&self, &str) -> Result<Self::Output>; }
Rename
Parser
toTransformer
and implementParser
as a specialization ofTransformer
where theInput
is a string.