Various unimportant minor style/doc fixups
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/370/head
parent
41e965b8a3
commit
264782d228
|
@ -830,9 +830,10 @@ impl Account {
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mailboxes_order(&self) -> &Vec<MailboxHash> {
|
pub fn mailboxes_order(&self) -> &[MailboxHash] {
|
||||||
&self.mailboxes_order
|
&self.mailboxes_order
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn name(&self) -> &str {
|
pub fn name(&self) -> &str {
|
||||||
&self.name
|
&self.name
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ pub struct FileAccount {
|
||||||
pub identity: String,
|
pub identity: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub extra_identities: Vec<String>,
|
pub extra_identities: Vec<String>,
|
||||||
#[serde(default = "none")]
|
#[serde(default = "none", skip_serializing_if = "Option::is_none")]
|
||||||
pub display_name: Option<String>,
|
pub display_name: Option<String>,
|
||||||
|
|
||||||
#[serde(default = "false_val")]
|
#[serde(default = "false_val")]
|
||||||
|
@ -180,14 +180,18 @@ pub struct FileAccount {
|
||||||
pub order: (SortField, SortOrder),
|
pub order: (SortField, SortOrder),
|
||||||
#[serde(default = "false_val")]
|
#[serde(default = "false_val")]
|
||||||
pub manual_refresh: bool,
|
pub manual_refresh: bool,
|
||||||
#[serde(default = "none")]
|
#[serde(default = "none", skip_serializing_if = "Option::is_none")]
|
||||||
pub refresh_command: Option<String>,
|
pub refresh_command: Option<String>,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub conf_override: MailUIConf,
|
pub conf_override: MailUIConf,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
#[serde(deserialize_with = "extra_settings")]
|
#[serde(
|
||||||
pub extra: IndexMap<String, String>, /* use custom deserializer to convert any given value
|
deserialize_with = "extra_settings",
|
||||||
* (eg bool, number, etc) to string */
|
skip_serializing_if = "IndexMap::is_empty"
|
||||||
|
)]
|
||||||
|
/// Use custom deserializer to convert any given value (eg `bool`, number,
|
||||||
|
/// etc) to `String`.
|
||||||
|
pub extra: IndexMap<String, String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileAccount {
|
impl FileAccount {
|
||||||
|
@ -195,10 +199,6 @@ impl FileAccount {
|
||||||
&self.mailboxes
|
&self.mailboxes
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mailbox(&self) -> &str {
|
|
||||||
&self.root_mailbox
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn search_backend(&self) -> &SearchBackend {
|
pub fn search_backend(&self) -> &SearchBackend {
|
||||||
&self.search_backend
|
&self.search_backend
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,10 @@ pub use crate::{SortField, SortOrder};
|
||||||
#[derive(Clone, Debug, Default, Serialize)]
|
#[derive(Clone, Debug, Default, Serialize)]
|
||||||
pub struct AccountSettings {
|
pub struct AccountSettings {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
/// Name of mailbox that is the root of the mailbox hierarchy.
|
||||||
|
///
|
||||||
|
/// Note that this may have special or no meaning depending on the e-mail
|
||||||
|
/// backend.
|
||||||
pub root_mailbox: String,
|
pub root_mailbox: String,
|
||||||
pub format: String,
|
pub format: String,
|
||||||
pub identity: String,
|
pub identity: String,
|
||||||
|
|
Loading…
Reference in New Issue