8b85c02ef1
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.
16 lines
602 B
Rust
16 lines
602 B
Rust
use crate::error::CustomError;
|
|
|
|
/// The supporting information used for converting the parsed org source representation into the intermediate representation used in this project.
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct IntermediateContext<'orig, 'parse> {
|
|
pub(crate) registry: crate::intermediate::RefRegistry<'orig, 'parse>,
|
|
}
|
|
|
|
impl<'orig, 'parse> IntermediateContext<'orig, 'parse> {
|
|
pub(crate) fn new(
|
|
registry: crate::intermediate::RefRegistry<'orig, 'parse>,
|
|
) -> Result<IntermediateContext<'orig, 'parse>, CustomError> {
|
|
Ok(IntermediateContext { registry })
|
|
}
|
|
}
|