1 |
mod operations;
|
2 |
|
3 |
pub use operations::*;
|
4 |
use serde::{de::DeserializeOwned, Serialize};
|
5 |
|
6 |
pub trait Setting: Serialize + DeserializeOwned + Send + Sync {
|
7 |
fn name() -> &'static str;
|
8 |
}
|
9 |
|
10 |
#[derive(Clone, Copy, Hash, PartialEq, Eq, Debug)]
|
11 |
pub struct ObjectSettingPair<'s> {
|
12 |
pub object_kind: &'s str,
|
13 |
pub setting_name: &'s str,
|
14 |
}
|
15 |
|
16 |
impl<'s> ObjectSettingPair<'s> {
|
17 |
pub fn new(object_kind: &'s str, setting_name: &'s str) -> Self {
|
18 |
Self {
|
19 |
object_kind,
|
20 |
setting_name,
|
21 |
}
|
22 |
}
|
23 |
}
|
24 |
|