pub struct ImapConfig {
pub host: String,
pub port: u16,
pub username: String,
pub password: String,
}Expand description
IMAP connection configuration for Proton Bridge
Fields§
§host: String§port: u16§username: String§password: StringImplementations§
Source§impl ImapConfig
impl ImapConfig
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Load IMAP configuration from environment variables
Reads from .env file if present. Required variables:
IMAP_USERNAMEIMAP_PASSWORD
Optional (with defaults):
IMAP_HOST(default:127.0.0.1)IMAP_PORT(default:1143)
§Errors
Returns an error if required environment variables are
missing or IMAP_PORT is not a valid port number.
Trait Implementations§
Source§impl Clone for ImapConfig
impl Clone for ImapConfig
Source§fn clone(&self) -> ImapConfig
fn clone(&self) -> ImapConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ImapConfig
impl RefUnwindSafe for ImapConfig
impl Send for ImapConfig
impl Sync for ImapConfig
impl Unpin for ImapConfig
impl UnwindSafe for ImapConfig
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