pub struct EmailAccount {
pub instance: String,
pub address: String,
pub auth: EmailAuth,
pub allow_agents: Vec<String>,
}Fields§
§instance: String§address: String§auth: EmailAuth§allow_agents: Vec<String>Implementations§
Source§impl EmailAccount
impl EmailAccount
Sourcepub fn xoauth2_sasl(username: &str, access_token: &str) -> String
pub fn xoauth2_sasl(username: &str, access_token: &str) -> String
SASL XOAUTH2 payload as specified by RFC 7628 §3.2.1, base64’d.
Caller passes the freshly-resolved access token so this stays a
pure function — easy to unit-test against vendor fixtures.
Sourcepub async fn resolve_access_token(
&self,
google: &GoogleCredentialStore,
) -> Result<SecretString, CredentialError>
pub async fn resolve_access_token( &self, google: &GoogleCredentialStore, ) -> Result<SecretString, CredentialError>
Resolve a usable bearer token. For Password returns the
password material itself (caller picks AUTH=PLAIN/LOGIN). For
OAuth2Static returns the local access_token. For
OAuth2Google delegates to the [GoogleCredentialStore] under
its per-account refresh mutex; the caller is responsible for
holding the returned SecretString no longer than necessary.
Trait Implementations§
Source§impl Clone for EmailAccount
impl Clone for EmailAccount
Source§fn clone(&self) -> EmailAccount
fn clone(&self) -> EmailAccount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EmailAccount
impl RefUnwindSafe for EmailAccount
impl Send for EmailAccount
impl Sync for EmailAccount
impl Unpin for EmailAccount
impl UnsafeUnpin for EmailAccount
impl UnwindSafe for EmailAccount
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
Mutably borrows from an owned value. Read more