parent
750e32c8e1
commit
52bcecfd4a
|
@ -134,6 +134,7 @@ use super::*;
|
||||||
|
|
||||||
let literal_struct = quote! {
|
let literal_struct = quote! {
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct #override_ident {
|
pub struct #override_ident {
|
||||||
#(#field_tokentrees),*
|
#(#field_tokentrees),*
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ macro_rules! mailbox_settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct MailUIConf {
|
pub struct MailUIConf {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub pager: PagerSettingsOverride,
|
pub pager: PagerSettingsOverride,
|
||||||
|
@ -191,6 +192,7 @@ impl FileAccount {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct FileSettings {
|
pub struct FileSettings {
|
||||||
pub accounts: HashMap<String, FileAccount>,
|
pub accounts: HashMap<String, FileAccount>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
@ -821,6 +823,7 @@ mod pp {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct LogSettings {
|
pub struct LogSettings {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
log_file: Option<PathBuf>,
|
log_file: Option<PathBuf>,
|
||||||
|
|
|
@ -25,6 +25,7 @@ use std::collections::HashMap;
|
||||||
|
|
||||||
/// Settings for writing and sending new e-mail
|
/// Settings for writing and sending new e-mail
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ComposingSettings {
|
pub struct ComposingSettings {
|
||||||
/// A command to pipe new emails to
|
/// A command to pipe new emails to
|
||||||
/// Required
|
/// Required
|
||||||
|
|
|
@ -25,6 +25,7 @@ use melib::{MeliError, Result};
|
||||||
|
|
||||||
/// Settings for mail listings
|
/// Settings for mail listings
|
||||||
#[derive(Debug, Deserialize, Clone, Serialize)]
|
#[derive(Debug, Deserialize, Clone, Serialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ListingSettings {
|
pub struct ListingSettings {
|
||||||
/// Number of context lines when going to next page.
|
/// Number of context lines when going to next page.
|
||||||
/// Default: 0
|
/// Default: 0
|
||||||
|
|
|
@ -23,6 +23,7 @@ use super::default_vals::{internal_value_false, none};
|
||||||
|
|
||||||
/// Settings for the notifications function.
|
/// Settings for the notifications function.
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct NotificationsSettings {
|
pub struct NotificationsSettings {
|
||||||
/// A command to pipe notifications through
|
/// A command to pipe notifications through
|
||||||
/// Default: None
|
/// Default: None
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct PagerSettingsOverride {
|
pub struct PagerSettingsOverride {
|
||||||
#[doc = " Number of context lines when going to next page."]
|
#[doc = " Number of context lines when going to next page."]
|
||||||
#[doc = " Default: 0"]
|
#[doc = " Default: 0"]
|
||||||
|
@ -94,6 +95,7 @@ impl Default for PagerSettingsOverride {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ListingSettingsOverride {
|
pub struct ListingSettingsOverride {
|
||||||
#[doc = " Number of context lines when going to next page."]
|
#[doc = " Number of context lines when going to next page."]
|
||||||
#[doc = " Default: 0"]
|
#[doc = " Default: 0"]
|
||||||
|
@ -131,6 +133,7 @@ impl Default for ListingSettingsOverride {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct NotificationsSettingsOverride {
|
pub struct NotificationsSettingsOverride {
|
||||||
#[doc = " A command to pipe notifications through"]
|
#[doc = " A command to pipe notifications through"]
|
||||||
#[doc = " Default: None"]
|
#[doc = " Default: None"]
|
||||||
|
@ -161,6 +164,7 @@ impl Default for NotificationsSettingsOverride {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ShortcutsOverride {
|
pub struct ShortcutsOverride {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub general: Option<GeneralShortcuts>,
|
pub general: Option<GeneralShortcuts>,
|
||||||
|
@ -199,6 +203,7 @@ impl Default for ShortcutsOverride {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ComposingSettingsOverride {
|
pub struct ComposingSettingsOverride {
|
||||||
#[doc = " A command to pipe new emails to"]
|
#[doc = " A command to pipe new emails to"]
|
||||||
#[doc = " Required"]
|
#[doc = " Required"]
|
||||||
|
@ -235,6 +240,7 @@ impl Default for ComposingSettingsOverride {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct TagsSettingsOverride {
|
pub struct TagsSettingsOverride {
|
||||||
#[serde(deserialize_with = "tag_color_de")]
|
#[serde(deserialize_with = "tag_color_de")]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
@ -253,6 +259,7 @@ impl Default for TagsSettingsOverride {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct PGPSettingsOverride {
|
pub struct PGPSettingsOverride {
|
||||||
#[doc = " auto verify signed e-mail according to RFC3156"]
|
#[doc = " auto verify signed e-mail according to RFC3156"]
|
||||||
#[serde(alias = "auto-verify-signatures")]
|
#[serde(alias = "auto-verify-signatures")]
|
||||||
|
|
|
@ -28,6 +28,7 @@ use melib::{MeliError, Result, ToggleFlag};
|
||||||
|
|
||||||
/// Settings for the pager function.
|
/// Settings for the pager function.
|
||||||
#[derive(Debug, Deserialize, Clone, Serialize)]
|
#[derive(Debug, Deserialize, Clone, Serialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct PagerSettings {
|
pub struct PagerSettings {
|
||||||
/// Number of context lines when going to next page.
|
/// Number of context lines when going to next page.
|
||||||
/// Default: 0
|
/// Default: 0
|
||||||
|
|
|
@ -23,6 +23,7 @@ use super::default_vals::*;
|
||||||
|
|
||||||
/// Settings for digital signing and encryption
|
/// Settings for digital signing and encryption
|
||||||
#[derive(Debug, Deserialize, Clone, Serialize)]
|
#[derive(Debug, Deserialize, Clone, Serialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct PGPSettings {
|
pub struct PGPSettings {
|
||||||
/// auto verify signed e-mail according to RFC3156
|
/// auto verify signed e-mail according to RFC3156
|
||||||
#[serde(default = "true_val", alias = "auto-verify-signatures")]
|
#[serde(default = "true_val", alias = "auto-verify-signatures")]
|
||||||
|
|
|
@ -35,6 +35,7 @@ macro_rules! shortcut {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct Shortcuts {
|
pub struct Shortcuts {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub general: GeneralShortcuts,
|
pub general: GeneralShortcuts,
|
||||||
|
|
|
@ -29,6 +29,7 @@ use std::collections::{hash_map::DefaultHasher, HashMap, HashSet};
|
||||||
use std::hash::Hasher;
|
use std::hash::Hasher;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Clone, Serialize)]
|
#[derive(Debug, Deserialize, Clone, Serialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct TagsSettings {
|
pub struct TagsSettings {
|
||||||
#[serde(default, deserialize_with = "tag_color_de")]
|
#[serde(default, deserialize_with = "tag_color_de")]
|
||||||
pub colors: HashMap<u64, Color>,
|
pub colors: HashMap<u64, Color>,
|
||||||
|
|
|
@ -28,7 +28,7 @@ use melib::{MeliError, Result, ToggleFlag};
|
||||||
|
|
||||||
/// Settings for terminal display
|
/// Settings for terminal display
|
||||||
#[derive(Debug, Deserialize, Clone, Serialize)]
|
#[derive(Debug, Deserialize, Clone, Serialize)]
|
||||||
#[serde(default)]
|
#[serde(default, deny_unknown_fields)]
|
||||||
pub struct TerminalSettings {
|
pub struct TerminalSettings {
|
||||||
/// light, dark
|
/// light, dark
|
||||||
pub theme: String,
|
pub theme: String,
|
||||||
|
|
|
@ -306,6 +306,7 @@ const DEFAULT_KEYS: &[&str] = &[
|
||||||
|
|
||||||
/// `ThemeAttributeInner` but with the links resolved.
|
/// `ThemeAttributeInner` but with the links resolved.
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Default, Copy, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Eq, Clone, Default, Copy, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ThemeAttribute {
|
pub struct ThemeAttribute {
|
||||||
pub fg: Color,
|
pub fg: Color,
|
||||||
pub bg: Color,
|
pub bg: Color,
|
||||||
|
@ -314,6 +315,7 @@ pub struct ThemeAttribute {
|
||||||
|
|
||||||
/// Holds {fore,back}ground color and terminal attribute values.
|
/// Holds {fore,back}ground color and terminal attribute values.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
pub struct ThemeAttributeInner {
|
pub struct ThemeAttributeInner {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
fg: ThemeValue<Color>,
|
fg: ThemeValue<Color>,
|
||||||
|
@ -799,6 +801,7 @@ impl<'de> Deserialize<'de> for Themes {
|
||||||
rest: ThemeAttributeInnerOptions,
|
rest: ThemeAttributeInnerOptions,
|
||||||
}
|
}
|
||||||
#[derive(Deserialize, Default)]
|
#[derive(Deserialize, Default)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
struct ThemeAttributeInnerOptions {
|
struct ThemeAttributeInnerOptions {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
fg: Option<ThemeValue<Color>>,
|
fg: Option<ThemeValue<Color>>,
|
||||||
|
|
Loading…
Reference in New Issue