Skip to main content

ProcessCapability

Trait ProcessCapability 

Source
pub trait ProcessCapability: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn process(&self, raw: &mut RawDoc) -> Result<(), DocError>;

    // Provided methods
    fn is_available(&self) -> bool { ... }
    fn should_apply(&self, _raw: &RawDoc) -> bool { ... }
}
Expand description

处理能力:全局共享,就地增强 RawDoc(OCR / layout)。

Required Methods§

Source

fn id(&self) -> &str

Source

fn process(&self, raw: &mut RawDoc) -> Result<(), DocError>

Provided Methods§

Source

fn is_available(&self) -> bool

Source

fn should_apply(&self, _raw: &RawDoc) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§