Add intermediate lifetime.

This commit is contained in:
Tom Alexander 2023-10-29 12:15:07 -04:00
parent 52ca300de3
commit cb7c28c1ae
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
59 changed files with 140 additions and 140 deletions

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IAngleLink {}
impl IAngleLink {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::AngleLink<'parse>,
) -> Result<IAngleLink, CustomError> {
Ok(IAngleLink {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IBabelCall {}
impl IBabelCall {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::BabelCall<'parse>,
) -> Result<IBabelCall, CustomError> {
Ok(IBabelCall {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IBold {}
impl IBold {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Bold<'parse>,
) -> Result<IBold, CustomError> {
Ok(IBold {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ICenterBlock {}
impl ICenterBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::CenterBlock<'parse>,
) -> Result<ICenterBlock, CustomError> {
Ok(ICenterBlock {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ICitation {}
impl ICitation {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Citation<'parse>,
) -> Result<ICitation, CustomError> {
Ok(ICitation {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ICitationReference {}
impl ICitationReference {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::CitationReference<'parse>,
) -> Result<ICitationReference, CustomError> {
Ok(ICitationReference {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IClock {}
impl IClock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Clock<'parse>,
) -> Result<IClock, CustomError> {
Ok(IClock {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ICode {}
impl ICode {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Code<'parse>,
) -> Result<ICode, CustomError> {
Ok(ICode {})

View File

@ -7,8 +7,8 @@ use super::registry::Registry;
pub(crate) struct IComment {}
impl IComment {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
comment: &organic::types::Comment<'parse>,
) -> Result<IComment, CustomError> {
Ok(IComment {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ICommentBlock {}
impl ICommentBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::CommentBlock<'parse>,
) -> Result<ICommentBlock, CustomError> {
Ok(ICommentBlock {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IDiarySexp {}
impl IDiarySexp {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::DiarySexp<'parse>,
) -> Result<IDiarySexp, CustomError> {
Ok(IDiarySexp {})

View File

@ -12,9 +12,9 @@ pub(crate) enum IDocumentElement {
}
impl IDocumentElement {
pub(crate) fn new<'parse, 'b>(
registry: &'b mut Registry<'parse>,
original: &'b organic::types::DocumentElement<'parse>,
pub(crate) fn new<'intermediate, 'parse, 'b>(
registry: &'b mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::DocumentElement<'parse>,
) -> BoxFuture<'b, Result<IDocumentElement, CustomError>> {
async move {
match original {

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IDrawer {}
impl IDrawer {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Drawer<'parse>,
) -> Result<IDrawer, CustomError> {
Ok(IDrawer {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IDynamicBlock {}
impl IDynamicBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::DynamicBlock<'parse>,
) -> Result<IDynamicBlock, CustomError> {
Ok(IDynamicBlock {})

View File

@ -56,9 +56,9 @@ pub(crate) enum IElement {
}
impl IElement {
pub(crate) fn new<'parse, 'b>(
registry: &'b mut Registry<'parse>,
elem: &'b organic::types::Element<'parse>,
pub(crate) fn new<'intermediate, 'parse, 'b>(
registry: &'b mut Registry<'intermediate, 'parse>,
elem: &'intermediate organic::types::Element<'parse>,
) -> BoxFuture<'b, Result<IElement, CustomError>> {
async move {
match elem {

View File

@ -8,8 +8,8 @@ pub(crate) struct IEntity {
}
impl IEntity {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Entity<'parse>,
) -> Result<IEntity, CustomError> {
Ok(IEntity {

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IExampleBlock {}
impl IExampleBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::ExampleBlock<'parse>,
) -> Result<IExampleBlock, CustomError> {
Ok(IExampleBlock {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IExportBlock {}
impl IExportBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::ExportBlock<'parse>,
) -> Result<IExportBlock, CustomError> {
Ok(IExportBlock {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IExportSnippet {}
impl IExportSnippet {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::ExportSnippet<'parse>,
) -> Result<IExportSnippet, CustomError> {
Ok(IExportSnippet {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IFixedWidthArea {}
impl IFixedWidthArea {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::FixedWidthArea<'parse>,
) -> Result<IFixedWidthArea, CustomError> {
Ok(IFixedWidthArea {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IFootnoteDefinition {}
impl IFootnoteDefinition {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::FootnoteDefinition<'parse>,
) -> Result<IFootnoteDefinition, CustomError> {
Ok(IFootnoteDefinition {})

View File

@ -8,9 +8,9 @@ pub(crate) struct IFootnoteReference {
}
impl IFootnoteReference {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::FootnoteReference<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::FootnoteReference<'parse>,
) -> Result<IFootnoteReference, CustomError> {
let footnote_id = registry.get_footnote_reference_id(original.label, &original.definition);
Ok(IFootnoteReference { footnote_id })

View File

@ -12,27 +12,27 @@ pub(crate) struct IHeading {
}
impl IHeading {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
heading: &organic::types::Heading<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::Heading<'parse>,
) -> Result<IHeading, CustomError> {
let title = {
let mut ret = Vec::new();
for obj in heading.title.iter() {
for obj in original.title.iter() {
ret.push(IObject::new(registry, obj).await?);
}
ret
};
let children = {
let mut ret = Vec::new();
for obj in heading.children.iter() {
for obj in original.children.iter() {
ret.push(IDocumentElement::new(registry, obj).await?);
}
ret
};
Ok(IHeading {
title,
level: heading.level,
level: original.level,
children,
})
}

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IHorizontalRule {}
impl IHorizontalRule {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::HorizontalRule<'parse>,
) -> Result<IHorizontalRule, CustomError> {
Ok(IHorizontalRule {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IInlineBabelCall {}
impl IInlineBabelCall {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::InlineBabelCall<'parse>,
) -> Result<IInlineBabelCall, CustomError> {
Ok(IInlineBabelCall {})

View File

@ -8,8 +8,8 @@ pub(crate) struct IInlineSourceBlock {
}
impl IInlineSourceBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::InlineSourceBlock<'parse>,
) -> Result<IInlineSourceBlock, CustomError> {
Ok(IInlineSourceBlock {

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IItalic {}
impl IItalic {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Italic<'parse>,
) -> Result<IItalic, CustomError> {
Ok(IItalic {})

View File

@ -7,8 +7,8 @@ use super::registry::Registry;
pub(crate) struct IKeyword {}
impl IKeyword {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
keyword: &organic::types::Keyword<'parse>,
) -> Result<IKeyword, CustomError> {
Ok(IKeyword {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ILatexEnvironment {}
impl ILatexEnvironment {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::LatexEnvironment<'parse>,
) -> Result<ILatexEnvironment, CustomError> {
Ok(ILatexEnvironment {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ILatexFragment {}
impl ILatexFragment {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::LatexFragment<'parse>,
) -> Result<ILatexFragment, CustomError> {
Ok(ILatexFragment {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ILineBreak {}
impl ILineBreak {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::LineBreak<'parse>,
) -> Result<ILineBreak, CustomError> {
Ok(ILineBreak {})

View File

@ -62,9 +62,9 @@ pub(crate) enum IObject {
}
impl IObject {
pub(crate) fn new<'parse, 'b>(
registry: &'b mut Registry<'parse>,
obj: &'b organic::types::Object<'parse>,
pub(crate) fn new<'intermediate, 'parse, 'b>(
registry: &'b mut Registry<'intermediate, 'parse>,
obj: &'intermediate organic::types::Object<'parse>,
) -> BoxFuture<'b, Result<IObject, CustomError>> {
async move {
match obj {

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IOrgMacro {}
impl IOrgMacro {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::OrgMacro<'parse>,
) -> Result<IOrgMacro, CustomError> {
Ok(IOrgMacro {})

View File

@ -18,10 +18,10 @@ pub(crate) struct BlogPostPage {
}
impl BlogPostPage {
pub(crate) async fn new<'parse, P: Into<PathBuf>>(
pub(crate) async fn new<'intermediate, 'parse, P: Into<PathBuf>>(
path: P,
registry: &mut Registry<'parse>,
document: &organic::types::Document<'parse>,
registry: &mut Registry<'intermediate, 'parse>,
document: &'intermediate organic::types::Document<'parse>,
) -> Result<BlogPostPage, CustomError> {
let path = path.into();
let mut children = Vec::new();

View File

@ -9,13 +9,13 @@ pub(crate) struct IParagraph {
}
impl IParagraph {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
paragraph: &organic::types::Paragraph<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::Paragraph<'parse>,
) -> Result<IParagraph, CustomError> {
let children = {
let mut ret = Vec::new();
for obj in paragraph.children.iter() {
for obj in original.children.iter() {
ret.push(IObject::new(registry, obj).await?);
}
ret

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IPlainLink {}
impl IPlainLink {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::PlainLink<'parse>,
) -> Result<IPlainLink, CustomError> {
Ok(IPlainLink {})

View File

@ -10,20 +10,20 @@ pub(crate) struct IPlainList {
}
impl IPlainList {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
plain_list: &organic::types::PlainList<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::PlainList<'parse>,
) -> Result<IPlainList, CustomError> {
let children = {
let mut ret = Vec::new();
for obj in plain_list.children.iter() {
for obj in original.children.iter() {
ret.push(IPlainListItem::new(registry, obj).await?);
}
ret
};
Ok(IPlainList {
list_type: plain_list.list_type,
list_type: original.list_type,
children,
})
}

View File

@ -11,13 +11,13 @@ pub(crate) struct IPlainListItem {
}
impl IPlainListItem {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
plain_list_item: &organic::types::PlainListItem<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::PlainListItem<'parse>,
) -> Result<IPlainListItem, CustomError> {
let tag = {
let mut ret = Vec::new();
for obj in plain_list_item.tag.iter() {
for obj in original.tag.iter() {
ret.push(IObject::new(registry, obj).await?);
}
ret
@ -25,7 +25,7 @@ impl IPlainListItem {
let children = {
let mut ret = Vec::new();
for elem in plain_list_item.children.iter() {
for elem in original.children.iter() {
ret.push(IElement::new(registry, elem).await?);
}
ret

View File

@ -9,8 +9,8 @@ pub(crate) struct IPlainText {
}
impl IPlainText {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
plain_text: &organic::types::PlainText<'parse>,
) -> Result<IPlainText, CustomError> {
Ok(IPlainText {

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IPlanning {}
impl IPlanning {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Planning<'parse>,
) -> Result<IPlanning, CustomError> {
Ok(IPlanning {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IPropertyDrawer {}
impl IPropertyDrawer {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::PropertyDrawer<'parse>,
) -> Result<IPropertyDrawer, CustomError> {
Ok(IPropertyDrawer {})

View File

@ -9,9 +9,9 @@ pub(crate) struct IQuoteBlock {
}
impl IQuoteBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::QuoteBlock<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::QuoteBlock<'parse>,
) -> Result<IQuoteBlock, CustomError> {
let children = {
let mut ret = Vec::new();

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IRadioLink {}
impl IRadioLink {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::RadioLink<'parse>,
) -> Result<IRadioLink, CustomError> {
Ok(IRadioLink {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IRadioTarget {}
impl IRadioTarget {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::RadioTarget<'parse>,
) -> Result<IRadioTarget, CustomError> {
Ok(IRadioTarget {})

View File

@ -7,11 +7,11 @@ type IdCounter = u16;
pub(crate) struct Registry<'intermediate, 'parse> {
id_counter: IdCounter,
targets: HashMap<&'parse str, String>,
footnote_ids: Vec<(Option<&'parse str>, &Vec<Object<'parse>>)>,
footnote_ids: Vec<(Option<&'parse str>, &'intermediate Vec<Object<'parse>>)>,
}
impl<'parse> Registry<'parse> {
pub(crate) fn new() -> Registry<'parse> {
impl<'intermediate, 'parse> Registry<'intermediate, 'parse> {
pub(crate) fn new() -> Registry<'intermediate, 'parse> {
Registry {
id_counter: 0,
targets: HashMap::new(),
@ -32,7 +32,7 @@ impl<'parse> Registry<'parse> {
pub(crate) fn get_footnote_reference_id<'b>(
&'b mut self,
label: Option<&'parse str>,
definition: &'parse Vec<Object<'parse>>,
definition: &'intermediate Vec<Object<'parse>>,
) -> usize {
if let None = label {
// If it has no label then it must always get a new ID.

View File

@ -10,9 +10,9 @@ pub(crate) struct IRegularLink {
}
impl IRegularLink {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::RegularLink<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &'intermediate organic::types::RegularLink<'parse>,
) -> Result<IRegularLink, CustomError> {
let children = {
let mut ret = Vec::new();

View File

@ -9,9 +9,9 @@ pub(crate) struct ISection {
}
impl ISection {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
section: &organic::types::Section<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
section: &'intermediate organic::types::Section<'parse>,
) -> Result<ISection, CustomError> {
let children = {
let mut ret = Vec::new();

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ISpecialBlock {}
impl ISpecialBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::SpecialBlock<'parse>,
) -> Result<ISpecialBlock, CustomError> {
Ok(ISpecialBlock {})

View File

@ -8,8 +8,8 @@ pub(crate) struct ISrcBlock {
}
impl ISrcBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::SrcBlock<'parse>,
) -> Result<ISrcBlock, CustomError> {
let lines = original

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IStatisticsCookie {}
impl IStatisticsCookie {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::StatisticsCookie<'parse>,
) -> Result<IStatisticsCookie, CustomError> {
Ok(IStatisticsCookie {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IStrikeThrough {}
impl IStrikeThrough {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::StrikeThrough<'parse>,
) -> Result<IStrikeThrough, CustomError> {
Ok(IStrikeThrough {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ISubscript {}
impl ISubscript {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Subscript<'parse>,
) -> Result<ISubscript, CustomError> {
Ok(ISubscript {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ISuperscript {}
impl ISuperscript {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Superscript<'parse>,
) -> Result<ISuperscript, CustomError> {
Ok(ISuperscript {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ITable {}
impl ITable {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Table<'parse>,
) -> Result<ITable, CustomError> {
Ok(ITable {})

View File

@ -10,8 +10,8 @@ pub(crate) struct ITarget {
}
impl ITarget {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
target: &organic::types::Target<'parse>,
) -> Result<ITarget, CustomError> {
let id = registry.get_target(target.value);

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct ITimestamp {}
impl ITimestamp {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Timestamp<'parse>,
) -> Result<ITimestamp, CustomError> {
Ok(ITimestamp {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IUnderline {}
impl IUnderline {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Underline<'parse>,
) -> Result<IUnderline, CustomError> {
Ok(IUnderline {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IVerbatim {}
impl IVerbatim {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::Verbatim<'parse>,
) -> Result<IVerbatim, CustomError> {
Ok(IVerbatim {})

View File

@ -6,8 +6,8 @@ use super::registry::Registry;
pub(crate) struct IVerseBlock {}
impl IVerseBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
original: &organic::types::VerseBlock<'parse>,
) -> Result<IVerseBlock, CustomError> {
Ok(IVerseBlock {})