use super::text::Paragraph; use super::text::TextElement; #[derive(Debug)] pub enum Token<'a> { TextElement(TextElement<'a>), Paragraph(Paragraph<'a>), } impl<'a> Into> for TextElement<'a> { fn into(self) -> Token<'a> { Token::TextElement(self) } } impl<'a> Into> for Paragraph<'a> { fn into(self) -> Token<'a> { Token::Paragraph(self) } }