mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
Add more documentation comments
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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<Socks5Config>,
|
||||
pub strict_tls: bool,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//! # IMAP folder selection module.
|
||||
|
||||
use anyhow::Context as _;
|
||||
|
||||
use super::session::Session as ImapSession;
|
||||
|
||||
@@ -473,11 +473,15 @@ fn decode_webrtc_instance(_context: &Context, qr: &str) -> Result<Qr> {
|
||||
|
||||
#[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,
|
||||
}
|
||||
|
||||
|
||||
@@ -592,6 +592,8 @@ pub(crate) fn improve_single_line_input(input: &str) -> String {
|
||||
}
|
||||
|
||||
pub(crate) trait IsNoneOrEmpty<T> {
|
||||
/// Returns true if an Option does not contain a string
|
||||
/// or contains an empty string.
|
||||
fn is_none_or_empty(&self) -> bool;
|
||||
}
|
||||
impl<T> IsNoneOrEmpty<T> for Option<T>
|
||||
|
||||
Reference in New Issue
Block a user