pub struct Pop3ConnectionFactory {}Implementations§
Source§impl Pop3ConnectionFactory
impl Pop3ConnectionFactory
Sourcepub fn new(
host: &str,
port: u16,
) -> Result<Pop3ConnectionImpl<StreamOwned<ClientConnection, TcpStream>>, Box<dyn Error>>
pub fn new( host: &str, port: u16, ) -> Result<Pop3ConnectionImpl<StreamOwned<ClientConnection, TcpStream>>, Box<dyn Error>>
Returns a new POP3 connection.
§Arguments
host- IP-Address or host name of the POP3 server to connectport- Port of the POP3 server to connect
Sourcepub fn with_custom_certs(
host: &str,
port: u16,
root_store: RootCertStore,
) -> Result<Pop3ConnectionImpl<StreamOwned<ClientConnection, TcpStream>>, Box<dyn Error>>
pub fn with_custom_certs( host: &str, port: u16, root_store: RootCertStore, ) -> Result<Pop3ConnectionImpl<StreamOwned<ClientConnection, TcpStream>>, Box<dyn Error>>
Returns a new POP3 connection with custom certificates.
§Arguments
host- IP-Address or host name of the POP3 server to connectport- Port of the POP3 server to connectroot_store- Store of trusted (root) certificates.
§Examples
use rust_pop3_client::Pop3ConnectionFactory;
use rustls::RootCertStore;
let mut root_store = RootCertStore::empty();
for cert in rustls_native_certs::load_native_certs().certs {
root_store.add(cert).unwrap();
}
let connection = Pop3ConnectionFactory::with_custom_certs("", 995, root_store);Auto Trait Implementations§
impl Freeze for Pop3ConnectionFactory
impl RefUnwindSafe for Pop3ConnectionFactory
impl Send for Pop3ConnectionFactory
impl Sync for Pop3ConnectionFactory
impl Unpin for Pop3ConnectionFactory
impl UnwindSafe for Pop3ConnectionFactory
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