pub trait FormatPlugin: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn formats(&self) -> &[&str];
fn default_parse_chain(&self) -> Vec<&'static str>;
fn default_process_chain(&self) -> Vec<&'static str>;
fn assemble(&self, raw: &RawDoc) -> Document;
}Expand description
文档插件:某文件类型的完整处理器(组装 RawDoc → IR Document)。
Required Methods§
fn id(&self) -> &str
fn formats(&self) -> &[&str]
fn default_parse_chain(&self) -> Vec<&'static str>
fn default_process_chain(&self) -> Vec<&'static str>
fn assemble(&self, raw: &RawDoc) -> Document
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".