natter/src/intermediate/document_element.rs
Tom Alexander 8b85c02ef1
Wrap the intermediate Registry in an IntermediateContext.
This is currently just to maintain consistency with the render phase's RenderContext but in the future it should allow us to include immutable data that is not locked behind the ArcMutex.
2023-12-21 13:53:56 -05:00

37 lines
786 B
Rust

use super::macros::iitem;
use super::macros::iselector;
use super::IHeading;
use super::ISection;
use crate::error::CustomError;
use futures::future::{BoxFuture, FutureExt};
#[derive(Debug, Clone)]
pub(crate) enum IDocumentElement {
Heading(IHeading),
Section(ISection),
}
iselector!(
IDocumentElement,
DocumentElement,
original,
intermediate_context,
{
iitem!(
intermediate_context,
original,
(
organic::types::DocumentElement::Heading,
IDocumentElement::Heading,
IHeading
),
(
organic::types::DocumentElement::Section,
IDocumentElement::Section,
ISection
),
)
}
);