core: implement Clone for CachedProcessorMap<S>

This commit is contained in:
Aode (lion) 2021-10-29 14:52:59 -05:00
parent e3bba29de4
commit c93fec98a0
2 changed files with 2 additions and 1 deletions

View file

@ -1,7 +1,7 @@
[package] [package]
name = "background-jobs-core" name = "background-jobs-core"
description = "Core types for implementing an asynchronous jobs processor" description = "Core types for implementing an asynchronous jobs processor"
version = "0.9.3" version = "0.9.4"
license-file = "../LICENSE" license-file = "../LICENSE"
authors = ["asonix <asonix@asonix.dog>"] authors = ["asonix <asonix@asonix.dog>"]
repository = "https://git.asonix.dog/Aardwolf/background-jobs" repository = "https://git.asonix.dog/Aardwolf/background-jobs"

View file

@ -28,6 +28,7 @@ pub struct ProcessorMap<S> {
/// ///
/// [`Job`]s must be registered with the `ProcessorMap` in the initialization phase of an /// [`Job`]s must be registered with the `ProcessorMap` in the initialization phase of an
/// application before workers are spawned in order to handle queued jobs. /// application before workers are spawned in order to handle queued jobs.
#[derive(Clone)]
pub struct CachedProcessorMap<S> { pub struct CachedProcessorMap<S> {
inner: HashMap<String, ProcessFn<S>>, inner: HashMap<String, ProcessFn<S>>,
state: S, state: S,