Trait pest_deconstruct::FromPest [−][src]
pub trait FromPest<'a>: Sized { type Rule: RuleType; const RULE: Self::Rule; fn from_pest(pest: Pair<'a, Self::Rule>) -> Self; }
Convert from the Pest parse tree to a typed AST node.
Associated Types
Associated Constants
Required Methods
fn from_pest(pest: Pair<'a, Self::Rule>) -> Self
Convert from a Pest parse tree node to a new AST node.
Panics
If pest.as_rule() != <Self as FromPest>::RULE
.