pub trait DigestionAPI {
// Required methods
fn initialize_singletons(&mut self, preloads: Vec<String>) -> Result<()>;
fn digest(
&mut self,
request: String,
preamble: Option<String>,
postamble: Option<String>,
mode: Option<DigestionMode>,
no_init: bool,
) -> Result<Digested>;
fn digest_setup(
&mut self,
request: String,
preamble: Option<String>,
postamble: Option<String>,
mode: Option<DigestionMode>,
) -> Result<String>;
fn digest_file(
&mut self,
request: String,
options: DigestionOptions,
) -> Result<Digested>;
fn digest_internal(&mut self) -> Result<Digested>;
fn convert_file(&mut self, filepath: String) -> Result<Document>;
fn convert_streaming(
&mut self,
request: String,
preamble: Option<String>,
postamble: Option<String>,
mode: Option<DigestionMode>,
budget: usize,
) -> Result<Document>;
fn convert_document(&mut self, digested: Digested) -> Result<Document>;
// Provided methods
fn load_preamble(&mut self, preamble: String) { ... }
fn load_postamble(&mut self, postamble: String) { ... }
}Required Methods§
fn initialize_singletons(&mut self, preloads: Vec<String>) -> Result<()>
fn digest( &mut self, request: String, preamble: Option<String>, postamble: Option<String>, mode: Option<DigestionMode>, no_init: bool, ) -> Result<Digested>
fn digest_setup( &mut self, request: String, preamble: Option<String>, postamble: Option<String>, mode: Option<DigestionMode>, ) -> Result<String>
fn digest_file( &mut self, request: String, options: DigestionOptions, ) -> Result<Digested>
fn digest_internal(&mut self) -> Result<Digested>
fn convert_file(&mut self, filepath: String) -> Result<Document>
Sourcefn convert_streaming(
&mut self,
request: String,
preamble: Option<String>,
postamble: Option<String>,
mode: Option<DigestionMode>,
budget: usize,
) -> Result<Document>
fn convert_streaming( &mut self, request: String, preamble: Option<String>, postamble: Option<String>, mode: Option<DigestionMode>, budget: usize, ) -> Result<Document>
Streaming (fragmented) conversion: interleaved digest→build with
spill-to-disk, a streaming pass 2, and placeholder-spliced assembly.
The Perl-parity eager path is digest + convert_document; this is the
sanctioned bounded-memory divergence (OXIDIZED_DESIGN), activated only
via Config::streaming.
fn convert_document(&mut self, digested: Digested) -> Result<Document>
Provided Methods§
Sourcefn load_preamble(&mut self, preamble: String)
fn load_preamble(&mut self, preamble: String)
Load preamble content. Perl: Core.pm loadPreamble
Sourcefn load_postamble(&mut self, postamble: String)
fn load_postamble(&mut self, postamble: String)
Load postamble content. Perl: Core.pm loadPostamble
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl DigestionAPI for Core
impl DigestionAPI for Core
Source§fn digest_setup(
&mut self,
request: String,
preamble: Option<String>,
postamble: Option<String>,
mode: Option<DigestionMode>,
) -> Result<String>
fn digest_setup( &mut self, request: String, preamble: Option<String>, postamble: Option<String>, mode: Option<DigestionMode>, ) -> Result<String>
The input-side half of DigestionAPI::digest: canonicalize the
request, seed SOURCEFILE/SOURCEDIRECTORY/SEARCHPATHS/\jobname, queue
postamble/source/preamble on the gullet. Returns the progress-note label
the caller must note_end when digestion completes. Shared by the eager
path and convert_streaming (which drives digestion itself,
fragment-by-fragment).
Source§fn convert_document(&mut self, digested: Digested) -> Result<Document>
fn convert_document(&mut self, digested: Digested) -> Result<Document>
Restriction: convert_document runs on a single thread, and should never try branching out.
Source§fn digest_file(
&mut self,
request: String,
options: DigestionOptions,
) -> Result<Digested>
fn digest_file( &mut self, request: String, options: DigestionOptions, ) -> Result<Digested>
Restriction: digest_file runs on a single thread, and should never try branching out.