cuprated/config/rayon.rs
1use serde::{Deserialize, Serialize};
2
3use super::macros::config_struct;
4
5config_struct! {
6 /// The [`rayon`] config.
7 #[derive(Debug, Deserialize, Serialize, Eq, PartialEq)]
8 #[serde(deny_unknown_fields, default)]
9 pub struct RayonConfig {
10 #[comment_out = true]
11 /// Type | Number
12 /// Valid values | >= 1
13 /// Examples | 1, 8, 14
14 pub threads: usize,
15 }
16}
17
18impl Default for RayonConfig {
19 fn default() -> Self {
20 Self {
21 threads: cuprate_helper::thread::threads_75().get(),
22 }
23 }
24}