Skip to main content

Worker

Trait Worker 

Source
pub trait Worker: Send + Sync {
    // Required method
    fn execute(&self) -> Result<String, String>;
}
Expand description

Trait for implementing a worker’s execution logic.

Each worker type (Audit, Optimize, etc.) should have a corresponding implementation of this trait. Implementations are registered with WorkerManager::register_implementation() and dispatched via WorkerManager::dispatch().

Required Methods§

Source

fn execute(&self) -> Result<String, String>

Execute the worker’s logic and return a summary string.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§