use crate::error::CustomError; use super::registry::Registry; use super::IParagraph; #[derive(Debug)] pub(crate) enum IElement { Paragraph(IParagraph), } impl IElement { pub(crate) async fn new<'parse>( registry: &mut Registry<'parse>, elem: &organic::types::Element<'parse>, ) -> Result { match elem { organic::types::Element::Paragraph(inner) => { Ok(IElement::Paragraph(IParagraph::new(registry, inner).await?)) } organic::types::Element::PlainList(_) => todo!(), organic::types::Element::CenterBlock(_) => todo!(), organic::types::Element::QuoteBlock(_) => todo!(), organic::types::Element::SpecialBlock(_) => todo!(), organic::types::Element::DynamicBlock(_) => todo!(), organic::types::Element::FootnoteDefinition(_) => todo!(), organic::types::Element::Comment(_) => todo!(), organic::types::Element::Drawer(_) => todo!(), organic::types::Element::PropertyDrawer(_) => todo!(), organic::types::Element::Table(_) => todo!(), organic::types::Element::VerseBlock(_) => todo!(), organic::types::Element::CommentBlock(_) => todo!(), organic::types::Element::ExampleBlock(_) => todo!(), organic::types::Element::ExportBlock(_) => todo!(), organic::types::Element::SrcBlock(_) => todo!(), organic::types::Element::Clock(_) => todo!(), organic::types::Element::DiarySexp(_) => todo!(), organic::types::Element::Planning(_) => todo!(), organic::types::Element::FixedWidthArea(_) => todo!(), organic::types::Element::HorizontalRule(_) => todo!(), organic::types::Element::Keyword(_) => todo!(), organic::types::Element::BabelCall(_) => todo!(), organic::types::Element::LatexEnvironment(_) => todo!(), } } }