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
|
||||
}
|
||||
|
||||
pub fn mailboxes_order(&self) -> &Vec<MailboxHash> {
|
||||
pub fn mailboxes_order(&self) -> &[MailboxHash] {
|
||||
&self.mailboxes_order
|
||||
}
|
||||
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ pub struct FileAccount {
|
|||
pub identity: String,
|
||||
#[serde(default)]
|
||||
pub extra_identities: Vec<String>,
|
||||
#[serde(default = "none")]
|
||||
#[serde(default = "none", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<String>,
|
||||
|
||||
#[serde(default = "false_val")]
|
||||
|
@ -180,14 +180,18 @@ pub struct FileAccount {
|
|||
pub order: (SortField, SortOrder),
|
||||
#[serde(default = "false_val")]
|
||||
pub manual_refresh: bool,
|
||||
#[serde(default = "none")]
|
||||
#[serde(default = "none", skip_serializing_if = "Option::is_none")]
|
||||
pub refresh_command: Option<String>,
|
||||
#[serde(flatten)]
|
||||
pub conf_override: MailUIConf,
|
||||
#[serde(flatten)]
|
||||
#[serde(deserialize_with = "extra_settings")]
|
||||
pub extra: IndexMap<String, String>, /* use custom deserializer to convert any given value
|
||||
* (eg bool, number, etc) to string */
|
||||
#[serde(
|
||||
deserialize_with = "extra_settings",
|
||||
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 {
|
||||
|
@ -195,10 +199,6 @@ impl FileAccount {
|
|||
&self.mailboxes
|
||||
}
|
||||
|
||||
pub fn mailbox(&self) -> &str {
|
||||
&self.root_mailbox
|
||||
}
|
||||
|
||||
pub fn search_backend(&self) -> &SearchBackend {
|
||||
&self.search_backend
|
||||
}
|
||||
|
|
|
@ -33,6 +33,10 @@ pub use crate::{SortField, SortOrder};
|
|||
#[derive(Clone, Debug, Default, Serialize)]
|
||||
pub struct AccountSettings {
|
||||
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 format: String,
|
||||
pub identity: String,
|
||||
|
|
Loading…
Reference in New Issue