pub trait SimplePreprocessor: Sized + Send + Sync {
// Required methods
fn name() -> &'static str;
fn build(ctx: &PreprocessorContext) -> Result<Self>;
fn replacements(
&self,
chapter_dir: &Path,
content: &str
) -> Result<Vec<(Range<usize>, String)>>;
fn linked_assets(&self) -> Vec<Asset>;
fn all_assets(&self) -> Vec<Asset>;
// Provided method
fn finish(self) { ... }
}
Required Methods§
fn name() -> &'static str
fn build(ctx: &PreprocessorContext) -> Result<Self>
fn replacements( &self, chapter_dir: &Path, content: &str ) -> Result<Vec<(Range<usize>, String)>>
fn linked_assets(&self) -> Vec<Asset>
fn all_assets(&self) -> Vec<Asset>
Provided Methods§
Object Safety§
This trait is not object safe.