pub trait Backend {
// Required methods
fn compile(&self, params: &dyn BackendCompileParams) -> HyperlitResult<()>;
fn transform_segment(&self, segment: &Segment) -> HyperlitResult<String>;
// Provided method
fn prepare(
&mut self,
_params: &mut dyn BackendCompileParams,
) -> HyperlitResult<()> { ... }
}Expand description
An output backend
Required Methods§
Sourcefn compile(&self, params: &dyn BackendCompileParams) -> HyperlitResult<()>
fn compile(&self, params: &dyn BackendCompileParams) -> HyperlitResult<()>
Perform the actual compilation of the documentation In this step the files in the build_directory should be transformed into the output_directory
Sourcefn transform_segment(&self, segment: &Segment) -> HyperlitResult<String>
fn transform_segment(&self, segment: &Segment) -> HyperlitResult<String>
Transform a given segment into its representation in the backend language (e.g., markdown)
Provided Methods§
Sourcefn prepare(
&mut self,
_params: &mut dyn BackendCompileParams,
) -> HyperlitResult<()>
fn prepare( &mut self, _params: &mut dyn BackendCompileParams, ) -> HyperlitResult<()>
Perform an (optional)preparation step before files are copied to the build directory