pub struct Converter { /* private fields */ }Implementations§
Source§impl Converter
impl Converter
pub fn from_config(opts: Config) -> Converter
pub fn initialize_session(&mut self) -> Result<()>
pub fn bind_log(&mut self)
pub fn flush_log(&mut self) -> String
pub fn convert(self, source: String) -> ConversionResponse
Sourcepub fn convert_content_with_provenance(
self,
name: &str,
content: String,
) -> ConversionResponse
pub fn convert_content_with_provenance( self, name: &str, content: String, ) -> ConversionResponse
Convert in-memory content under the source name name, producing the
HTML5-format core XML (the persistent server then post-processes it).
Unlike Converter::convert (literal: → anonymous source), the source
is named, so --source-map stamps its locators. Focused on the
Document/HTML5 path the server uses — no amble wrapping, no TeX/Box
output formats.
pub fn prepare_session<'preplifetime>( &'preplifetime mut self, _opts: &'preplifetime Config, ) -> Result<()>
Sourcepub fn digest_content_with_provenance(
&mut self,
name: &str,
content: String,
) -> Result<Digested>
pub fn digest_content_with_provenance( &mut self, name: &str, content: String, ) -> Result<Digested>
Digest in-memory content as the main document named name, leaving
the thread-local engine state live. Used by the persistent server to
warm a preamble once (then resume body digestion in a fork child over the
inherited state) and by Converter::convert_content_with_provenance for
the in-process path.
This is the in-memory twin of crate::core_interface::DigestionAPI::digest_file:
same top-level spine — establish the source context, open the source,
digest_internal — but the content is supplied rather than read from
disk. It shares core_interface::establish_source_context with
digest_file (so SOURCEFILE/SOURCEDIRECTORY/SEARCHPATHS/
GRAPHICSPATHS/\jobname can’t drift), making sibling
\usepackage/\input/\includegraphics of local files resolve. The
source is opened as a named mouth (not the anonymous literal:
protocol) so locators carry name — the provenance that
--source-map needs (stamp_source_locator only stamps
.tex/.ltx/.bbl/.bib user sources). Initializes the session if
needed; does not finalize a document.