Skip to main content

NewWorker

Trait NewWorker 

Source
pub trait NewWorker<C> {
    // Required method
    fn factory(context: C) -> impl WorkerFactory + 'static;
}
Expand description

A worker that can be built on contexts of type C.

Required Methods§

Source

fn factory(context: C) -> impl WorkerFactory + 'static

The factory the runner rebuilds this worker with after a restart.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Context> NewWorker<Context> for ConfigurationWorker<Context>
where Context: CoreContext + 'static,

Source§

impl<Context> NewWorker<Context> for HmacEpochWorker<Context>
where Context: CoreContext + 'static,

Source§

impl<Context> NewWorker<Context> for CommitLogWorker<Context>
where Context: XmtpSharedContext + 'static,

Source§

impl<Context> NewWorker<Context> for SyncWorker<Context>
where Context: XmtpSharedContext + 'static,

Source§

impl<Context> NewWorker<Context> for DisappearingMessagesWorker<Context>
where Context: CoreContext + 'static,

Source§

impl<Context, Handlers> NewWorker<Context> for TaskWorker<Context, Handlers>
where Context: CoreContext + 'static, Handlers: TaskHandlers<Context> + Default + 'static,