2023-10-29 18:26:52 -04:00
|
|
|
use super::macros::iitem;
|
2023-10-29 17:29:16 -04:00
|
|
|
use super::macros::iselector;
|
2023-10-27 18:59:40 -04:00
|
|
|
use super::registry::Registry;
|
2023-10-27 13:05:34 -04:00
|
|
|
use super::IHeading;
|
|
|
|
use super::ISection;
|
2023-10-29 17:29:16 -04:00
|
|
|
use crate::error::CustomError;
|
2023-10-27 18:59:40 -04:00
|
|
|
use futures::future::{BoxFuture, FutureExt};
|
2023-10-27 13:05:34 -04:00
|
|
|
|
2023-10-29 15:36:15 -04:00
|
|
|
#[derive(Debug, Clone)]
|
2023-10-27 13:05:34 -04:00
|
|
|
pub(crate) enum IDocumentElement {
|
|
|
|
Heading(IHeading),
|
|
|
|
Section(ISection),
|
|
|
|
}
|
2023-10-27 18:59:40 -04:00
|
|
|
|
2023-10-29 18:54:50 -04:00
|
|
|
iselector!(IDocumentElement, DocumentElement, original, registry, {
|
|
|
|
iitem!(
|
|
|
|
registry,
|
|
|
|
original,
|
|
|
|
(
|
|
|
|
organic::types::DocumentElement::Heading,
|
|
|
|
IDocumentElement::Heading,
|
|
|
|
IHeading
|
|
|
|
),
|
|
|
|
(
|
|
|
|
organic::types::DocumentElement::Section,
|
|
|
|
IDocumentElement::Section,
|
|
|
|
ISection
|
|
|
|
),
|
|
|
|
)
|
|
|
|
});
|