use crate::parser::{ParseResult, Parser, ParserInput, Representation}; pub struct BoxedParser<'a, I, O, E> where I: ParserInput, { inner: Box + 'a>, } impl<'a, I, O, E> BoxedParser<'a, I, O, E> where I: ParserInput, { pub(crate) fn new

(inner: P) -> Self where P: Parser + 'a, { BoxedParser { inner: Box::new(inner), } } } impl<'a, I: ParserInput, O, E> Parser for BoxedParser<'a, I, O, E> { fn representation(&self) -> Representation { self.inner.representation() } fn parse(&self, input: I) -> ParseResult { self.inner.parse(input) } fn boxed<'b>(self) -> BoxedParser<'b, I, O, E> where Self: Sized + 'b, { self } }