Skip to main content

TaskType

Trait TaskType 

Source
pub trait TaskType:
    ToString
    + Debug
    + Send
    + Sync { }
Expand description

A TaskType is used to group kinds of tasks. This is useful if you have specialized workers, where one worker only processes on or a few types of tasks. You might also think of it as the “topic”. In the simplest case just use a String or &str. But you can also use a custom enum that implements this trait.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TaskType for &str

Source§

impl TaskType for String

Implementors§