pub struct Account {Show 34 fields
pub id: String,
pub kind: AccountKind,
pub enabled: bool,
pub address: Option<String>,
pub maildir: Option<String>,
pub url: Option<String>,
pub site: Option<String>,
pub realtime: bool,
pub muted: bool,
pub background: Option<bool>,
pub microphone: Option<bool>,
pub camera: Option<bool>,
pub screen: Option<bool>,
pub categories: Vec<String>,
pub announced_by: Vec<String>,
pub area: Option<String>,
pub trusted_authserv_ids: Vec<String>,
pub host: Option<String>,
pub port: Option<u16>,
pub security: Security,
pub username: Option<String>,
pub sync_days: Option<u32>,
pub auth: Option<String>,
pub skip_folders: Vec<String>,
pub history_weeks: Option<u32>,
pub priority: Priority,
pub name: Option<String>,
pub smtp_host: Option<String>,
pub smtp_port: Option<u16>,
pub smtp_security: Security,
pub signature: Option<String>,
pub fetch_minutes: Option<u32>,
pub shield: bool,
pub shield_ai: bool,
}Fields§
§id: String§kind: AccountKind§enabled: boolSwitched off in Accounts: kept with its settings, neither synced nor shown.
address: Option<String>§maildir: Option<String>Where this account’s mail is kept on disk (Maildir); see Account::maildir_path.
url: Option<String>For portals: the address of the web mailbox.
site: Option<String>For portals, what the site is: “mailbox” (a secure mailbox), “chat”, “dating”, “other”.
realtime: boolFor portals: its notifications shown at once, not at your pace.
muted: boolFor portals: its sounds silenced.
background: Option<bool>For portals: kept open while the window is, to receive its notifications.
microphone: Option<bool>For portals: the microphone, the camera, sharing the screen, for calls; unsaid, as its kind goes (chats, video calls and dating sites have them).
camera: Option<bool>§screen: Option<bool>§categories: Vec<String>For portals: your own categories, any words (“Banque”, “Santé”): the list filters by them.
announced_by: Vec<String>For portals: the domains whose mail says something waits there (“you have a new message in your secure mailbox”); the site’s own domain when unsaid.
area: Option<String>“personal” for an address, or a site, of yours outside work: it stays in view in quiet time.
trusted_authserv_ids: Vec<String>The authserv-id your provider writes in Authentication-Results (RFC 8601).
host: Option<String>The IMAP server, found from the address when the account is added.
port: Option<u16>§security: Security§username: Option<String>The login, when it is not the address.
sync_days: Option<u32>How many days of mail the first sync brings.
auth: Option<String>How it signs in: “google” for Google’s OAuth (its tokens in the keyring); a password otherwise.
skip_folders: Vec<String>Folders not kept here, by their server names: they stay on the server only.
history_weeks: Option<u32>How far back this account’s mail reaches, in weeks, 0 for everything;
the configuration’s history_weeks when unset.
priority: PriorityHow its mail ranks against the other accounts’.
name: Option<String>Your name as the From line shows it.
smtp_host: Option<String>The SMTP submission server, found from the address when first needed.
smtp_port: Option<u16>§smtp_security: Security§signature: Option<String>Added below what you write, in Markdown.
fetch_minutes: Option<u32>Minutes between two fetches of this account, when it should come more or less often than the rest.
shield: boolA public address that may bring hostile mail: its mail is read first, held, and summarised (shield).
shield_ai: boolFor a shielded account, an AI may read its new mail to say its tone and topic (docs/ai.md).
Implementations§
Source§impl Account
impl Account
Sourcepub fn history_days(&self) -> Option<i64>
pub fn history_days(&self) -> Option<i64>
How far back this account’s mail reaches, in days; None for everything.
Sourcepub fn imap(
id: &str,
address: &str,
host: &str,
port: u16,
security: Security,
username: Option<&str>,
) -> Account
pub fn imap( id: &str, address: &str, host: &str, port: u16, security: Security, username: Option<&str>, ) -> Account
A mail account fetched over IMAP; username only when it differs from the address.
Sourcepub fn maildir_path(&self) -> PathBuf
pub fn maildir_path(&self) -> PathBuf
The Maildir of this account: maildir if set, else ~/.local/share/sioul/mail/<id>.
Sourcepub fn port_or_default(&self) -> u16
pub fn port_or_default(&self) -> u16
The port to use: port, else the usual one for the encryption.
Sourcepub fn smtp_port_or_default(&self) -> u16
pub fn smtp_port_or_default(&self) -> u16
The SMTP port to use: smtp_port, else the usual one for the encryption (RFC 8314).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Account
impl<'de> Deserialize<'de> for Account
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnsafeUnpin for Account
impl UnwindSafe for Account
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.