pg_taskq/
task_type.rs

1/// A [`TaskType`] is used to group kinds of tasks. This is useful if you have
2/// specialized workers, where one worker only processes on or a few types of
3/// tasks. You might also think of it as the "topic".
4/// In the simplest case just use a `String` or `&str`. But you can also use a
5/// custom enum that implements this trait.
6pub trait TaskType: ToString + std::fmt::Debug + Send + Sync {}
7
8impl TaskType for String {}
9
10impl TaskType for &str {}