Skip to main content

ParseCapability

Trait ParseCapability 

Source
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§

Source

fn id(&self) -> &str

Source

fn formats(&self) -> &[&str]

Source

fn parse(&self, path: &str) -> Result<RawDoc>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§