2022-12-16 06:35:49 +00:00
|
|
|
use super::text::Paragraph;
|
2022-12-04 04:53:52 +00:00
|
|
|
use super::text::TextElement;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum Token<'a> {
|
|
|
|
TextElement(TextElement<'a>),
|
2022-12-16 06:35:49 +00:00
|
|
|
Paragraph(Paragraph<'a>),
|
2022-12-04 04:53:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Into<Token<'a>> for TextElement<'a> {
|
|
|
|
fn into(self) -> Token<'a> {
|
|
|
|
Token::TextElement(self)
|
|
|
|
}
|
|
|
|
}
|
2022-12-16 06:35:49 +00:00
|
|
|
|
|
|
|
impl<'a> Into<Token<'a>> for Paragraph<'a> {
|
|
|
|
fn into(self) -> Token<'a> {
|
|
|
|
Token::Paragraph(self)
|
|
|
|
}
|
|
|
|
}
|