JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Fixed imports!

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨ef0e853

⁨giterated-models/src/settings/mod.rs⁩ - ⁨374⁩ bytes
Raw
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