diff --git a/src/accounts.rs b/src/accounts.rs index 8ec3a34c8..9f013bfe6 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -476,10 +476,13 @@ impl Config { struct AccountConfig { /// Unique id. pub id: u32, + /// Root directory for all data for this account. /// /// The path is relative to the account manager directory. pub dir: std::path::PathBuf, + + /// Universally unique account identifier. pub uuid: Uuid, } diff --git a/src/chat.rs b/src/chat.rs index 522f55aa7..26e7a7db2 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1881,7 +1881,10 @@ pub(crate) async fn update_special_chat_names(context: &Context) -> Result<()> { /// [`Deref`]: std::ops::Deref #[derive(Debug)] pub(crate) struct ChatIdBlocked { + /// Chat ID. pub id: ChatId, + + /// Whether the chat is blocked, unblocked or a contact request. pub blocked: Blocked, } diff --git a/src/configure.rs b/src/configure.rs index 565169470..48b91a3f7 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -646,10 +646,14 @@ async fn try_smtp_one_param( } } +/// Failure to connect and login with email client configuration. #[derive(Debug, thiserror::Error)] #[error("Trying {config}…\nError: {msg}")] pub struct ConfigurationError { + /// Tried configuration description. config: String, + + /// Error message. msg: String, } diff --git a/src/imap.rs b/src/imap.rs index d7fcf1397..9889df69b 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -116,6 +116,8 @@ impl async_imap::Authenticator for OAuth2 { #[derive(Debug, Display, PartialEq, Eq, Clone, Copy)] pub enum FolderMeaning { Unknown, + + /// Spam folder. Spam, Inbox, Mvbox, @@ -149,8 +151,11 @@ impl FolderMeaning { #[derive(Debug)] struct ImapConfig { + /// Email address. pub addr: String, pub lp: ServerLoginParam, + + /// SOCKS 5 configuration. pub socks5_config: Option, pub strict_tls: bool, } diff --git a/src/imap/select_folder.rs b/src/imap/select_folder.rs index f209edff4..2d6dfa9a6 100644 --- a/src/imap/select_folder.rs +++ b/src/imap/select_folder.rs @@ -1,3 +1,5 @@ +//! # IMAP folder selection module. + use anyhow::Context as _; use super::session::Session as ImapSession; diff --git a/src/qr.rs b/src/qr.rs index 982777b4a..b9ffbbad5 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -473,11 +473,15 @@ fn decode_webrtc_instance(_context: &Context, qr: &str) -> Result { #[derive(Debug, Deserialize)] struct CreateAccountSuccessResponse { + /// Email address. email: String, + + /// Password. password: String, } #[derive(Debug, Deserialize)] struct CreateAccountErrorResponse { + /// Reason for the failure to create account returned by the server. reason: String, } diff --git a/src/tools.rs b/src/tools.rs index 8703a124f..7e8d7e922 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -592,6 +592,8 @@ pub(crate) fn improve_single_line_input(input: &str) -> String { } pub(crate) trait IsNoneOrEmpty { + /// Returns true if an Option does not contain a string + /// or contains an empty string. fn is_none_or_empty(&self) -> bool; } impl IsNoneOrEmpty for Option