
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.
37 lines
786 B
Rust
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
|
|
),
|
|
)
|
|
}
|
|
);
|