1 |
mod operations;
|
2 |
|
3 |
pub use operations::*;
|
4 |
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
5 |
use serde_json::Value;
|
6 |
|
7 |
pub trait Setting: Serialize + DeserializeOwned {
|
8 |
fn name() -> &'static str;
|
9 |
}
|
10 |
|
11 |
#[derive(Debug, Clone, Serialize, Deserialize)]
|
12 |
pub struct AnySetting(pub Value);
|
13 |
|
14 |
impl Setting for AnySetting {
|
15 |
fn name() -> &'static str {
|
16 |
"any"
|
17 |
}
|
18 |
}
|
19 |
|