Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn on_change(&self, doc: &Document) -> Result<Option<Document>>;
}
Expand description

A Scrybe plugin can observe and transform documents.

Implementations live in scrybe-py (PyO3 bindings) and in native Rust for first-party extensions. The scrybe-app frontend invokes plugins via scrybe-panels (P3.3).

Required Methods§

Source

fn name(&self) -> &str

Human-readable plugin name.

Source

fn on_change(&self, doc: &Document) -> Result<Option<Document>>

Called when a document is opened or modified.

Returns an optionally transformed document. Return None to pass through unchanged.

Implementors§