pub trait ParseCapability: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn formats(&self) -> &[&str];
fn parse(&self, path: &str) -> Result<RawDoc>;
// Provided methods
fn kind(&self) -> BackendKind { ... }
fn is_available(&self) -> bool { ... }
}Expand description
解析能力:格式绑定,把文件读成 RawDoc。
Required Methods§
fn id(&self) -> &str
fn formats(&self) -> &[&str]
fn parse(&self, path: &str) -> Result<RawDoc>
Provided Methods§
fn kind(&self) -> BackendKind
fn is_available(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ParseCapability for CsvParseCapability
Available on crate feature
csv only.