natter/src/intermediate/footnote_reference.rs

19 lines
519 B
Rust
Raw Normal View History

2023-10-27 21:48:19 +00:00
use crate::error::CustomError;
use super::registry::Registry;
#[derive(Debug)]
2023-10-29 16:06:40 +00:00
pub(crate) struct IFootnoteReference {
footnote_id: usize,
}
2023-10-27 21:48:19 +00:00
impl IFootnoteReference {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::FootnoteReference<'parse>,
) -> Result<IFootnoteReference, CustomError> {
2023-10-29 16:06:40 +00:00
let footnote_id = registry.get_footnote_reference_id(original.label, &original.definition);
Ok(IFootnoteReference { footnote_id })
2023-10-27 21:48:19 +00:00
}
}