Skip to main content

WorkerPlugin

Trait WorkerPlugin 

Source
pub trait WorkerPlugin:
    Send
    + Sync
    + 'static {
    // Required method
    fn name(&self) -> &str;

    // Provided methods
    fn configure_worker_options(
        &self,
        _options: &mut WorkerOptions,
    ) -> Result<(), PluginError> { ... }
    fn configure_workflow_replayer_options(
        &self,
        _options: &mut WorkflowReplayerOptions,
    ) -> Result<(), PluginError> { ... }
}
Expand description

Configures worker options before the worker is created.

Use ClientAndWorkerPlugin for plugins that target both clients and workers.

Experimental: This API may change or be removed.

Required Methods§

Source

fn name(&self) -> &str

Stable, unique name used to identify this plugin.

Provided Methods§

Source

fn configure_worker_options( &self, _options: &mut WorkerOptions, ) -> Result<(), PluginError>

Configure worker options.

Worker plugin registrations are captured before this method is called. Altering plugins in this method does not change which plugins are applied.

Source

fn configure_workflow_replayer_options( &self, _options: &mut WorkflowReplayerOptions, ) -> Result<(), PluginError>

Configure workflow replayer options.

Replay plugin registrations are captured before this method is called. Altering plugins in this method does not change which plugins are applied.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§